makeWritable(); for (Map.Entry<String, Child> e : children.entrySet()) { int plen = commonPrefix(e.getKey(), s);
/** * Inserts a new node between this node and its parent, and returns that * node. Newly inserted 'middle' node will have this node as its sole * child. */ private Child split(final String prefix) { String suffix = node.getLabel().substring(prefix.length()); Child middle = new Child(node.split(prefix)); middle.makeWritable(); middle.children.put(suffix, this); return middle; }
/** * Inserts a new node between this node and its parent, and returns that * node. Newly inserted 'middle' node will have this node as its sole * child. */ private Child split(final String prefix) { String suffix = node.getLabel().substring(prefix.length()); Child middle = new Child(node.split(prefix)); middle.makeWritable(); middle.children.put(suffix, this); return middle; }
makeWritable(); for (Map.Entry<String, Child> e : children.entrySet()) { int plen = commonPrefix(e.getKey(), s);