goldman.collection.ordered.digitized
Class CompressedTrie.InternalNode
java.lang.Object
goldman.collection.ordered.digitized.AbstractTrieNode<E>
goldman.collection.ordered.digitized.Trie.InternalNode
goldman.collection.ordered.digitized.CompressedTrie.InternalNode
- All Implemented Interfaces:
- CompressedTrieNode<E>, TrieNode<E>
- Enclosing class:
- CompressedTrie<E>
protected class CompressedTrie.InternalNode
- extends Trie.InternalNode
- implements CompressedTrieNode<E>
Method Summary |
int |
bp()
Returns the position of the digit used for branching
at this node. |
E |
data()
Returns the data (if any) associated with this trie node. |
protected void |
setChild(TrieNode<E> child)
It adds child
as a child of this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
public E data()
- Description copied from interface:
TrieNode
- Returns the data (if any) associated with this trie node.
All data elements are held in leaf nodes, but for some trie implementations the internal
nodes hold a reference to an element that begins with the common prefix shared by all
of its descendants.
- Specified by:
data
in interface TrieNode<E>
- Overrides:
data
in class AbstractTrieNode<E>
- Returns:
- the data associated with this internal node
bp
public int bp()
- Description copied from interface:
CompressedTrieNode
- Returns the position of the digit used for branching
at this node.
- Specified by:
bp
in interface CompressedTrieNode<E>
- Returns:
- the branch position for this internal node.
setChild
protected void setChild(TrieNode<E> child)
- It adds
child
as a child of this node.
- Parameters:
child
- a reference to a trie node