|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldman.collection.ordered.digitized.AbstractTrieNode<E>
goldman.collection.ordered.digitized.AbstractTrieLeafNode<E>
public abstract class AbstractTrieLeafNode<E>
The AbstractTrieLeafNode class implements methods that can be shared by all implementations of a trie leaf node.
Constructor Summary | |
---|---|
AbstractTrieLeafNode()
|
Method Summary | |
---|---|
void |
addAfter(TrieLeafNode<E> ptr)
The TrieLeafNode interface must be supported by any
class defining objects to be used as leaf nodes in a trie. |
boolean |
isDeleted()
Returns true if and only if this trie leaf node is not in use. |
boolean |
isLeaf()
Returns true if and only if this trie node is a leaf. |
void |
markDeleted()
Marks this trie leaf node as no longer being in the collection |
TrieLeafNode<E> |
next()
Returns a reference to the next leaf node in the ordered leaf chain. |
TrieLeafNode<E> |
prev()
Returns a reference to previous leaf node in the ordered leaf chain. |
void |
remove()
Removes this leaf node from the ordered leaf chain and marks the removed trie leaf node as deleted. |
void |
setNext(TrieLeafNode<E> nextNode)
Sets the next element in the ordered leaf chain to the leaf node referenced by newNode . |
void |
setPrev(TrieLeafNode<E> prevNode)
Sets the previous element in the ordered leaf chain to prevNode . |
Methods inherited from class goldman.collection.ordered.digitized.AbstractTrieNode |
---|
child, data, parent, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface goldman.collection.ordered.digitized.TrieNode |
---|
child, data, parent, setParent |
Constructor Detail |
---|
public AbstractTrieLeafNode()
Method Detail |
---|
public boolean isLeaf()
TrieNode
isLeaf
in interface TrieNode<E>
isLeaf
in class AbstractTrieNode<E>
public TrieLeafNode<E> next()
TrieLeafNode
next
in interface TrieLeafNode<E>
public TrieLeafNode<E> prev()
TrieLeafNode
prev
in interface TrieLeafNode<E>
public void setNext(TrieLeafNode<E> nextNode)
TrieLeafNode
newNode
.
setNext
in interface TrieLeafNode<E>
nextNode
- the value
to set the next pointer.public void setPrev(TrieLeafNode<E> prevNode)
TrieLeafNode
prevNode
.
setPrev
in interface TrieLeafNode<E>
prevNode
- the value
to set the previous pointerpublic void markDeleted()
markDeleted
in interface TrieLeafNode<E>
public boolean isDeleted()
TrieLeafNode
isDeleted
in interface TrieLeafNode<E>
public void addAfter(TrieLeafNode<E> ptr)
TrieLeafNode
TrieLeafNode
interface must be supported by any
class defining objects to be used as leaf nodes in a trie.
Inserts
this trie leaf node into the ordered leaf chain
immediately after the trie leaf node referenced by ptr
.
addAfter
in interface TrieLeafNode<E>
ptr
- and places this trie leaf node after
the one referenced by ptr
in the ordered leaf chain.public void remove()
remove
in interface TrieLeafNode<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |