Class AbstractLinkedList.Node
- java.lang.Object
-
- org.apache.commons.collections.list.AbstractLinkedList.Node
-
- Enclosing class:
- AbstractLinkedList
protected static class AbstractLinkedList.Node extends Object
A node within the linked list.From Commons Collections 3.1, all access to the
valueproperty is via the methods on this class.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractLinkedList.NodenextA pointer to the node after this nodeprotected AbstractLinkedList.NodepreviousA pointer to the node before this nodeprotected ObjectvalueThe object contained within this node
-
Constructor Summary
Constructors Modifier Constructor Description protectedNode()Constructs a new header node.protectedNode(Object value)Constructs a new node.protectedNode(AbstractLinkedList.Node previous, AbstractLinkedList.Node next, Object value)Constructs a new node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractLinkedList.NodegetNextNode()Gets the next node.protected AbstractLinkedList.NodegetPreviousNode()Gets the previous node.protected ObjectgetValue()Gets the value of the node.protected voidsetNextNode(AbstractLinkedList.Node next)Sets the next node.protected voidsetPreviousNode(AbstractLinkedList.Node previous)Sets the previous node.protected voidsetValue(Object value)Sets the value of the node.
-
-
-
Field Detail
-
previous
protected AbstractLinkedList.Node previous
A pointer to the node before this node
-
next
protected AbstractLinkedList.Node next
A pointer to the node after this node
-
value
protected Object value
The object contained within this node
-
-
Constructor Detail
-
Node
protected Node()
Constructs a new header node.
-
Node
protected Node(Object value)
Constructs a new node.- Parameters:
value- the value to store
-
Node
protected Node(AbstractLinkedList.Node previous, AbstractLinkedList.Node next, Object value)
Constructs a new node.- Parameters:
previous- the previous node in the listnext- the next node in the listvalue- the value to store
-
-
Method Detail
-
getValue
protected Object getValue()
Gets the value of the node.- Returns:
- the value
- Since:
- Commons Collections 3.1
-
setValue
protected void setValue(Object value)
Sets the value of the node.- Parameters:
value- the value- Since:
- Commons Collections 3.1
-
getPreviousNode
protected AbstractLinkedList.Node getPreviousNode()
Gets the previous node.- Returns:
- the previous node
- Since:
- Commons Collections 3.1
-
setPreviousNode
protected void setPreviousNode(AbstractLinkedList.Node previous)
Sets the previous node.- Parameters:
previous- the previous node- Since:
- Commons Collections 3.1
-
getNextNode
protected AbstractLinkedList.Node getNextNode()
Gets the next node.- Returns:
- the next node
- Since:
- Commons Collections 3.1
-
setNextNode
protected void setNextNode(AbstractLinkedList.Node next)
Sets the next node.- Parameters:
next- the next node- Since:
- Commons Collections 3.1
-
-