Mercurial > hg > Members > tatsuki > bench > jungle-core
changeset 140:99bda30ea72c
temporarily stored
author | one |
---|---|
date | Fri, 07 Nov 2014 02:20:31 +0900 |
parents | ec166c8ff079 |
children | 3071b1a471fd |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/PutIndexEditor.java |
diffstat | 2 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Tue Oct 28 06:35:34 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Fri Nov 07 02:20:31 2014 +0900 @@ -66,22 +66,22 @@ TreeMap<String, List<Pair<TreeNode, NodePath>>> innerIndex = this.index.get(key).some(); - Option<List<Pair<TreeNode, NodePath>>> opList = innerIndex.get(searchValue); + Option<List<Pair<TreeNode, NodePath>>> opList = innerIndex.get(searchValue); - if (opList.isNone()) - return null;// 空のIteratorを返す + if (opList.isNone()) + return null;// 空のIteratorを返す - List<Pair<TreeNode, NodePath>> list = opList.some(); - NodePath targetNodePath = subTree.right(); - List<Pair<TreeNode, NodePath>> filteredList = List.nil(); - for (Pair<TreeNode, NodePath> pair : list) { - NodePath compareNodePath = pair.right(); - if (targetNodePath.compare(compareNodePath)) - filteredList = filteredList.cons(pair); - - } - - return filteredList.iterator(); + List<Pair<TreeNode, NodePath>> list = opList.some(); + NodePath targetNodePath = subTree.right(); + List<Pair<TreeNode, NodePath>> filteredList = List.nil(); + + for (Pair<TreeNode, NodePath> pair : list) { + NodePath compareNodePath = pair.right(); + if (targetNodePath.compare(compareNodePath)) + filteredList = filteredList.cons(pair); + } + + return filteredList.iterator(); } else { final PathNodeIterator itNode = new PathNodeIterator(subTree.left()); @@ -291,7 +291,6 @@ } } - public Iterator<Pair<TreeNode, NodePath>> findAll(Query query, String key) { if (index.get(key).isSome()) {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/PutIndexEditor.java Tue Oct 28 06:35:34 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/PutIndexEditor.java Fri Nov 07 02:20:31 2014 +0900 @@ -62,7 +62,7 @@ } else { TreeMap<String, List<Pair<TreeNode, NodePath>>> innerIndex = innerIndexOp.some(); - innerIndex.set(attribute, null); + Option<List<Pair<TreeNode, NodePath>>> opList = innerIndex.get(attribute); if (opList.isNone()) {