Node<T> (final String text, final int nameStartIndex, final boolean create, final Interner<String> table) { if (myChildren == null && !create) { return null; } final int textLen = text.length(); final int separatorIdx = text.indexOf(mySeparator, nameStartIndex); final int childNameEnd = separatorIdx >= 0 ? separatorIdx : textLen; if (myChildren != null) { final Node<T> child = myChildren.get(text.substring(nameStartIndex, childNameEnd)); if (child != null) { if (separatorIdx < 0) { return child; } return child.findRelative(text, childNameEnd + 1, create, table); } } if (create) { return addChild(table, text, nameStartIndex, childNameEnd); } return null; }