E - This parameter is a generic for the type of elements that will be stored in
the linked list.public class Node<E>
extends java.lang.Object
| Constructor and Description |
|---|
Node(E element)
Constructor LinkedListNode class.
|
| Modifier and Type | Method and Description |
|---|---|
E |
getElement()
Getter method to obtain a reference to the Object held by the LinkedListNode.
|
Node<E> |
getNext()
Getter method to obtain a reference to the next LinkedListNode in the Linked List.
|
void |
setElement(E element)
Setter method to set the reference to the Object held by the LinkedListNode.
|
void |
setNext(Node<E> next)
Setter method to set the reference to the next LinkedListNode in the Linked List.
|
public Node(E element)
null.element - This is the element Object held by the LinkedListNode.public E getElement()
public void setElement(E element)
element - The reference to the Object to be held by the LinkedListNode.public Node<E> getNext()