@Test public void testGetOutgoingEdge() throws Exception { Node node = new ByteArrayNodeNonLeafVoidValue("FOO", Arrays.asList((Node) new ByteArrayNodeDefault("BAR1", 1, Collections.<Node>emptyList()))); Assert.assertNotNull(node.getOutgoingEdge('B')); Assert.assertEquals(1, node.getOutgoingEdge('B').getValue()); }
@Override public Node getOutgoingEdge(Character edgeFirstCharacter) { int index = NodeUtil.binarySearchForEdge(outgoingEdges, edgeFirstCharacter); if (index < 0) { return null; } return outgoingEdges.get(index); }
ByteArrayNodeNonLeafVoidValue implements Node { @Override public Node getOutgoingEdge(Character edgeFirstCharacter) { int index = NodeUtil.binarySearchForEdge(outgoingEdges, edgeFirstCharacter); if (index < 0) { return null; } return outgoingEdges.get(index); } }
ByteArrayNodeNonLeafVoidValue implements Node { @Override public Node getOutgoingEdge(Character edgeFirstCharacter) { int index = NodeUtil.binarySearchForEdge(outgoingEdges, edgeFirstCharacter); if (index < 0) { return null; } return outgoingEdges.get(index); } ByteArrayNodeNonLeafVoidValue(CharSequence edgeCharSequence, List<Node> outgoingEdges); }
ByteArrayNodeNonLeafVoidValue implements Node { @Override public Node getOutgoingEdge(Character edgeFirstCharacter) { int index = NodeUtil.binarySearchForEdge(outgoingEdges, edgeFirstCharacter); if (index < 0) { return null; } return outgoingEdges.get(index); } ByteArrayNodeNonLeafVoidValue(CharSequence edgeCharSequence, List<Node> outgoingEdges); @Override CharSequence getIncomingEdge(); @Override Character getIncomingEdgeFirstCharacter(); @Override Object getValue(); @Override Node getOutgoingEdge(Character edgeFirstCharacter); @Override void updateOutgoingEdge(Node childNode); @Override List<Node> getOutgoingEdges(); @Override String toString(); }
ByteArrayNodeNonLeafVoidValue implements Node { @Override public Node getOutgoingEdge(Character edgeFirstCharacter) { int index = NodeUtil.binarySearchForEdge(outgoingEdges, edgeFirstCharacter); if (index < 0) { return null; } return outgoingEdges.get(index); } ByteArrayNodeNonLeafVoidValue(CharSequence edgeCharSequence, List<Node> outgoingEdges); @Override CharSequence getIncomingEdge(); @Override Character getIncomingEdgeFirstCharacter(); @Override Object getValue(); @Override Node getOutgoingEdge(Character edgeFirstCharacter); @Override void updateOutgoingEdge(Node childNode); @Override List<Node> getOutgoingEdges(); @Override String toString();  }