public final class MapBasedTree<K,N>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MapBasedTree.Entry<N> |
static class |
MapBasedTree.UpdateResult<N> |
Constructor and Description |
---|
MapBasedTree(boolean identity,
java.util.function.Function<? super N,? extends K> keyFunction) |
MapBasedTree(boolean identity,
java.util.function.Function<? super N,? extends K> keyFunction,
javax.swing.tree.TreePath path) |
Modifier and Type | Method and Description |
---|---|
MapBasedTree.Entry<N> |
findEntry(K key) |
N |
findNode(K key) |
MapBasedTree.Entry<N> |
getEntry(N node) |
K |
getKey(N node) |
MapBasedTree.Entry<N> |
getRootEntry() |
void |
invalidate() |
void |
onInsert(java.util.function.Consumer<? super N> consumer) |
void |
onRemove(java.util.function.Consumer<? super N> consumer) |
MapBasedTree.UpdateResult<N> |
update(MapBasedTree.Entry<N> parent,
java.util.List<? extends Pair<N,java.lang.Boolean>> children) |
boolean |
updateRoot(Pair<? extends N,java.lang.Boolean> pair) |
public MapBasedTree(boolean identity, java.util.function.Function<? super N,? extends K> keyFunction)
public void invalidate()
public void onRemove(java.util.function.Consumer<? super N> consumer)
public void onInsert(java.util.function.Consumer<? super N> consumer)
public MapBasedTree.Entry<N> findEntry(K key)
public MapBasedTree.Entry<N> getEntry(N node)
public MapBasedTree.Entry<N> getRootEntry()
public MapBasedTree.UpdateResult<N> update(MapBasedTree.Entry<N> parent, java.util.List<? extends Pair<N,java.lang.Boolean>> children)