@Test public void testCreateNode_CompatibleCharacters() throws Exception { Node node = smartNodeFactory.createNode("FOOBAR", VoidValue.SINGLETON, Collections.<Node>emptyList(), false); Assert.assertEquals(ByteArrayNodeLeafVoidValue.class, node.getClass()); }
@Override public Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot) { try { return byteArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } catch (ByteArrayCharSequence.IncompatibleCharacterException e) { return charArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } }
SmartArrayBasedNodeFactory implements NodeFactory { @Override public Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot) { try { return byteArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } catch (ByteArrayCharSequence.IncompatibleCharacterException e) { return charArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } } }
SmartArrayBasedNodeFactory implements NodeFactory { @Override public Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot) { try { return byteArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } catch (ByteArrayCharSequence.IncompatibleCharacterException e) { return charArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } }  }
SmartArrayBasedNodeFactory implements NodeFactory { @Override public Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot) { try { return byteArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } catch (ByteArrayCharSequence.IncompatibleCharacterException e) { return charArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } }  @Override Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot); }
SmartArrayBasedNodeFactory implements NodeFactory { @Override public Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot) { try { return byteArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } catch (ByteArrayCharSequence.IncompatibleCharacterException e) { return charArrayNodeFactory.createNode(edgeCharacters, value, childNodes, isRoot); } }  @Override Node createNode(CharSequence edgeCharacters, Object value, List<Node> childNodes, boolean isRoot);  }