|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.collection.base.AbstractLinkedNode<V,NODE>
V - is the generic type of the value of this node.NODE - is the generic type of the node
itself.public abstract class AbstractLinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>
This is the abstract base-implementation of the LinkedNode interface.
| Field Summary | |
|---|---|
private NODE |
next
|
private V |
value
|
| Constructor Summary | |
|---|---|
AbstractLinkedNode()
The constructor. |
|
| Method Summary | |
|---|---|
void |
addToList(List<V> list)
This method appends the values of the list represented
by this node to the given list. |
NODE |
getNext()
This method gets the next node of the linked list. |
V |
getValue()
This method gets the actual value of this node. |
boolean |
isLinked()
This method determines if this node is linked. |
void |
setNext(NODE next)
This method sets the next node. |
void |
setValue(V value)
This method sets the value. |
List<V> |
toList()
This method converts the list represented by this node to a regular List. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private V value
getValue()private NODE extends AbstractLinkedNode<V,NODE> next
getNext()| Constructor Detail |
|---|
public AbstractLinkedNode()
| Method Detail |
|---|
public NODE getNext()
getNext in interface LinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>node or null if this is
the last node (tail).public void setNext(NODE next)
next node.
next - is the next to set. May be null to indicate that
this is the last node of the list.public V getValue()
getValue in interface LinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>null.public void setValue(V value)
value.
value - is the value to set. May be null.public boolean isLinked()
next node.
isLinked in interface LinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>true if linked, false otherwise.public void addToList(List<V> list)
values of the list represented
by this node to the given list.List to convert a
LinkedNode-list to a regular List.
addToList in interface LinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>list - is where to append the values.public List<V> toList()
List.
toList in interface LinkedNode<V,NODE extends AbstractLinkedNode<V,NODE>>List of all values of the list
represented by this node.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||