public class Node<E>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private E |
data |
private Node<E> |
next |
private Node<E> |
previous |
| Constructor and Description |
|---|
Node(E data)
Constructor that for the Node class.
|
Node(Node<E> previous,
E data,
Node<E> next)
Constructor that for the Node class.
|
| Modifier and Type | Method and Description |
|---|---|
E |
getData()
Getter method to obtain a reference to the Object held by the Node.
|
Node<E> |
getNext()
Getter method to obtain a reference to the next Node.
|
Node<E> |
getPrevious()
Getter method to obtain a reference to the previous Node.
|
void |
setData(E data)
Setter method to set the reference to the Object held by the Node.
|
void |
setNext(Node<E> next)
Setter method to set the reference to the next Node.
|
void |
setPrevious(Node<E> previous)
Setter method to set the reference to the previous Node.
|
public Node(E data)
data - This is the data Object held by the Node.public E getData()
public void setData(E data)
data - The reference to the Object to be held by the Node.public Node<E> getNext()
public void setNext(Node<E> next)
next - The reference to the next Node.public Node<E> getPrevious()