goldman.collection.ordered.digitized
Class PatriciaTrie.Node
java.lang.Object
goldman.collection.ordered.digitized.AbstractTrieNode<E>
goldman.collection.ordered.digitized.AbstractTrieLeafNode<E>
goldman.collection.ordered.digitized.Trie.LeafNode
goldman.collection.ordered.digitized.CompressedTrie.LeafNode
goldman.collection.ordered.digitized.PatriciaTrie.Node
- All Implemented Interfaces:
- CompressedTrieNode<E>, TrieLeafNode<E>, TrieNode<E>
- Enclosing class:
- PatriciaTrie<E>
protected class PatriciaTrie.Node
- extends CompressedTrie.LeafNode
- implements CompressedTrieNode<E>, TrieLeafNode<E>
Method Summary |
int |
bp()
Returns the position of the digit used for branching
at this node. |
TrieNode<E> |
child(int i)
Returns a reference to the ith
child. |
int |
childIndex(E element,
int bp)
|
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>
- Overrides:
bp
in class CompressedTrie.LeafNode
- Returns:
- the branch
position for the node
child
public TrieNode<E> child(int i)
- Description copied from interface:
TrieNode
- Returns a reference to the ith
child.
- Specified by:
child
in interface TrieNode<E>
- Overrides:
child
in class AbstractTrieNode<E>
- Parameters:
i
- the index for the desired child
- Returns:
- the ith child
- Throws:
IllegalArgumentException
- i is
not between 0 and childCapacity
-1 (inclusive).
childIndex
public int childIndex(E element,
int bp)
- Parameters:
element
- the element for
which the child index soughtbp
- the
branch position of
this node
- Returns:
- the index of
the child determined by
sp(element)
when this node has
branch position bp