class Node
extends Object
| Modifier and Type | Field and Description |
|---|---|
private Object |
data
Data to be stored by this Node.
|
private Node |
next
This will store a reference to the next Node in the Queue.
|
private Node |
prev
This will store a reference to the previous Node in the Queue.
|
| Constructor and Description |
|---|
Node(Object obj)
Create a Node object and set its data element
equal to the given parameter
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Get and return the data element of this NOde
|
Node |
getNext()
Get and return the reference to the next Node in our Queue
|
Node |
getPrev()
Get and return the reference to the previous Node in our Queue
|
void |
setNext(Node next)
Set the reference to the next Node in our Queue
|
void |
setPrev(Node prev)
Set the reference to the previous Node in our Queue
|
private Object data
private Node next
private Node prev
public Node(Object obj)
obj - to be stored as this Nodes datapublic void setNext(Node next)
next - reference to be set for next Nodepublic void setPrev(Node prev)
prev - reference to be set for previous Nodepublic Node getNext()
public Node getPrev()
public Object getData()