|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldman.collection.ordered.digitized.AbstractTrieNode<E>
public abstract class AbstractTrieNode<E>
The AbstractTrieNode class implements methods that can be shared by all implementations of a trie node.
Constructor Summary | |
---|---|
AbstractTrieNode()
|
Method Summary | |
---|---|
TrieNode<E> |
child(int i)
Returns a reference to the ith child. |
E |
data()
Returns the data (if any) associated with this trie node. |
boolean |
isLeaf()
Returns true if and only if this trie node is a leaf. |
TrieNode<E> |
parent()
Returns a reference to the parent (or null for the root). |
void |
setParent(TrieNode<E> parent)
Sets the parent reference to be the given trie node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTrieNode()
Method Detail |
---|
public boolean isLeaf()
TrieNode
isLeaf
in interface TrieNode<E>
public TrieNode<E> parent()
TrieNode
parent
in interface TrieNode<E>
public void setParent(TrieNode<E> parent)
TrieNode
setParent
in interface TrieNode<E>
parent
- a reference to the
new parent referencepublic TrieNode<E> child(int i)
TrieNode
child
in interface TrieNode<E>
i
- the index for the desired childpublic E data()
TrieNode
data
in interface TrieNode<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |