|
||||||||||
| 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,BasicDoubleLinkedNode<V>>
net.sf.mmm.util.collection.base.BasicDoubleLinkedNode<V>
V - is the generic type of the value of this node.public class BasicDoubleLinkedNode<V>
This is a basic implementation of the DoubleLinkedNode interface.
| Field Summary | |
|---|---|
private BasicDoubleLinkedNode<V> |
previous
|
| Constructor Summary | |
|---|---|
BasicDoubleLinkedNode()
The constructor. |
|
| Method Summary | |
|---|---|
BasicDoubleLinkedNode<V> |
getPrevious()
This method gets the previous node of the double linked list. |
void |
insertAsNext(BasicDoubleLinkedNode<V> node)
This method inserts the given node into the list immediately
after the position represented by this node. |
BasicDoubleLinkedNode<V> |
insertAsNext(V value,
boolean overrideNullValue)
This method inserts the given value into the list at the
position represented by this node. |
void |
insertAsPrevious(BasicDoubleLinkedNode<V> node)
This method inserts the given node into the list immediately
before the position represented by this node. |
BasicDoubleLinkedNode<V> |
insertAsPrevious(V value,
boolean overrideNullValue)
This method inserts the given value into the list at the
position represented by this node. |
boolean |
isLinked()
This method determines if this node is linked. |
void |
remove()
This method removes this node from the double linked list. |
void |
setPrevious(BasicDoubleLinkedNode<V> previous)
This method sets the previous node. |
| Methods inherited from class net.sf.mmm.util.collection.base.AbstractLinkedNode |
|---|
addToList, getNext, getValue, setNext, setValue, toList, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.util.collection.api.LinkedNode |
|---|
addToList, getNext, getValue, toList |
| Field Detail |
|---|
private BasicDoubleLinkedNode<V> previous
getPrevious()| Constructor Detail |
|---|
public BasicDoubleLinkedNode()
| Method Detail |
|---|
public BasicDoubleLinkedNode<V> getPrevious()
getPrevious in interface DoubleLinkedNode<V,BasicDoubleLinkedNode<V>>null if this is the first node
(head).public void setPrevious(BasicDoubleLinkedNode<V> previous)
previous node.
previous - is the previous node to set. May be
null to indicate that this is the first node of the
list.
public BasicDoubleLinkedNode<V> insertAsNext(V value,
boolean overrideNullValue)
value into the list at the
position represented by this node. It will typically create a new node
containing the given value and
set it as next. It will guarantee
the following equation:
this.IfAbstractLinkedNode.getNext().getPrevious()== this
overrideNullValue is true and the
value of this node is null, then its value
is set to the given value instead of creating a new node.
value - is the value to insert.overrideNullValue - - true if a value
of null should be replaced with the given
value, false otherwise.
value.public void insertAsNext(BasicDoubleLinkedNode<V> node)
node into the list immediately
after the position represented by this node.
node - is the node to add.public void insertAsPrevious(BasicDoubleLinkedNode<V> node)
node into the list immediately
before the position represented by this node.
node - is the node to add.
public BasicDoubleLinkedNode<V> insertAsPrevious(V value,
boolean overrideNullValue)
value into the list at the
position represented by this node. It will typically create a new node
containing the given value and
set it as next. It will guarantee
the following equation:
this.IfAbstractLinkedNode.getNext().getPrevious()== this
overrideNullValue is true and the
value of this node is null, then its value
is set to the given value instead of creating a new node.
value - is the value to insert.overrideNullValue - - true if a value
of null should be replaced with the given
value, false otherwise.
value.public void remove()
public boolean isLinked()
next node.
isLinked in interface DoubleLinkedNode<V,BasicDoubleLinkedNode<V>>isLinked in interface LinkedNode<V,BasicDoubleLinkedNode<V>>isLinked in class AbstractLinkedNode<V,BasicDoubleLinkedNode<V>>true if linked, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||