Mercurial > hg > Members > nobuyasu > jungle-network
changeset 184:7ca4c7557c25
FindMatrixTest lambda
author | tatsuki |
---|---|
date | Mon, 15 Sep 2014 15:48:55 +0900 |
parents | bf08205d5c5f |
children | f54d4ab5df4b |
files | src/test/java/alice/jungle/log/example/FindMatrixTest.java |
diffstat | 1 files changed, 10 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/test/java/alice/jungle/log/example/FindMatrixTest.java Mon Sep 15 15:34:51 2014 +0900 +++ b/src/test/java/alice/jungle/log/example/FindMatrixTest.java Mon Sep 15 15:48:55 2014 +0900 @@ -47,22 +47,18 @@ InterfaceTraverser ifTraverser = tree.getTraverser(); Iterator<Pair<TreeNode, NodePath>> searchNode = ifTraverser.find( - new Query() { - - @Override - public boolean condition(TreeNode _node) { - ByteBuffer attribute = _node.getAttributes().get("mes"); - if(attribute != null){ - byte[] byteAttribute = attribute.array(); - String str = new String(byteAttribute); - System.out.println(str); - return str.equals("株式会社フタコ放送"); - } - return false; - } + (TreeNode node) -> { + ByteBuffer attribute = node.getAttributes().get("mes"); + if(attribute != null){ + byte[] byteAttribute = attribute.array(); + String str = new String(byteAttribute); + System.out.println(str); + return str.equals("株式会社フタコ放送"); + } + return false; } - ); + TreeNode node = searchNode.next().left(); byte[] nodeAttibute = node.getAttributes().get("mes").array(); System.out.println(new String(nodeAttibute));