public class Node<E>
extends java.lang.Object
| Constructor and Description |
|---|
Node(E element)
Creates a node with null references to its element
and next node.
|
Node(E element,
Node<E> next)
Creates a node with the given element and next node.
|
| Modifier and Type | Method and Description |
|---|---|
E |
getElement()
Returns the element stored in the current node
|
Node<E> |
getNext()
Returns the reference to the next node in the list
|
void |
setElement(E element)
Updates the value of the instance variable element
|
void |
setNext(Node<E> next)
Updates the value of the instance variable element
|
public Node(E element)