Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 187:d455e0ee7f4e fjTreeMap
fjTreeMap
author | tatsuki |
---|---|
date | Fri, 17 Apr 2015 20:40:32 +0900 |
parents | 066d9c5758dc |
children | 98d503fdda70 |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultTreeNodeAttribute.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/findTreeAttributeThread.java |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultTreeNodeAttribute.java Mon Mar 23 15:44:28 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultTreeNodeAttribute.java Fri Apr 17 20:40:32 2015 +0900 @@ -36,7 +36,7 @@ return DefaultEither.newA(NodeEditorError.NULL_VALUE_NOT_ALLOWED); } - if (!attrs.contains(_key)) { + if (null!=attrs.get(_key)) { return DefaultEither.newA(NodeEditorError.DELETE_KEY_NOT_FOUND); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/findTreeAttributeThread.java Mon Mar 23 15:44:28 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/findTreeAttributeThread.java Fri Apr 17 20:40:32 2015 +0900 @@ -12,14 +12,12 @@ public class findTreeAttributeThread extends JungleBenchMarkThread { JungleTree tree; - //InterfaceTraverser traverser; private long findCount; boolean loop = true; public findTreeAttributeThread(JungleTree tree) { this.tree = tree; - // this.traverser = tree.getTraverser(true); this.findCount = 0; } @@ -37,12 +35,14 @@ public void run() { while (loop) { InterfaceTraverser traverser = tree.getTraverser(false); - // Iterator<TreeNode> it = traverser.find((TreeNode node) -> {return true;}, "key", "0"); + Iterator<TreeNode> it = traverser.find((TreeNode node) -> { + return false; + }, "key", "0"); - // if (it.hasNext()) { - findCount++; - // } else - // System.out.println("faild"); + if (it.hasNext()) { + findCount++; + } + // System.out.println("faild"); } } }