Class AbstractLinkedListForJava21.Node<E>
java.lang.Object
org.apache.commons.collections4.list.AbstractLinkedListForJava21.Node<E>
- Enclosing class:
- AbstractLinkedListForJava21<E>
A node within the linked list.
From Commons Collections 3.1, all access to the value
property
is via the methods on this class.
-
Field Summary
Modifier and TypeFieldDescriptionprotected AbstractLinkedListForJava21.Node<E>
A pointer to the node after this nodeprotected AbstractLinkedListForJava21.Node<E>
A pointer to the node before this nodeprotected E
The object contained within this node -
Constructor Summary
ModifierConstructorDescriptionprotected
Node()
Constructs a new header node.protected
Constructs a new node.protected
Node
(AbstractLinkedListForJava21.Node<E> previous, AbstractLinkedListForJava21.Node<E> next, E value) Constructs a new node. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractLinkedListForJava21.Node<E>
Gets the next node.protected AbstractLinkedListForJava21.Node<E>
Gets the previous node.protected E
getValue()
Gets the value of the node.protected void
Sets the next node.protected void
setPreviousNode
(AbstractLinkedListForJava21.Node<E> previous) Sets the previous node.protected void
Sets the value of the node.
-
Field Details
-
previous
A pointer to the node before this node -
next
A pointer to the node after this node -
value
The object contained within this node
-
-
Constructor Details
-
Node
protected Node()Constructs a new header node. -
Node
Constructs a new node.- Parameters:
value
- the value to store
-
Node
protected Node(AbstractLinkedListForJava21.Node<E> previous, AbstractLinkedListForJava21.Node<E> next, E value) Constructs a new node.- Parameters:
previous
- the previous node in the listnext
- the next node in the listvalue
- the value to store
-
-
Method Details
-
getNextNode
Gets the next node.- Returns:
- the next node
- Since:
- 3.1
-
getPreviousNode
Gets the previous node.- Returns:
- the previous node
- Since:
- 3.1
-
getValue
Gets the value of the node.- Returns:
- the value
- Since:
- 3.1
-
setNextNode
Sets the next node.- Parameters:
next
- the next node- Since:
- 3.1
-
setPreviousNode
Sets the previous node.- Parameters:
previous
- the previous node- Since:
- 3.1
-
setValue
Sets the value of the node.- Parameters:
value
- the value- Since:
- 3.1
-