Class Queue.QNodeImpl
All Packages Class Hierarchy This Package Previous Next Index
Class Queue.QNodeImpl
java.lang.Object
|
+----Queue.QNodeImpl
- public class QNodeImpl
- extends Object
Class QNodeImpl represents a double linked list node. This class
is used in the implementation of the queue data structure.
-
elem
- the element of the node
-
next
- the next pointer
-
prev
- the previous pointer
-
QNodeImpl(Object)
- Constructor, given the content of the node
-
QNodeImpl(Object, QNodeImpl, QNodeImpl)
- Constructor, given the content of the node, and both links
-
insert(QNodeImpl, QNodeImpl)
- Method insert() will insert the current node into the queue,
given the previous node, and the next node.
-
remove()
- Method remove() will remove the current node from the queue.
elem
public Object elem
- the element of the node
prev
public QNodeImpl prev
- the previous pointer
next
public QNodeImpl next
- the next pointer
QNodeImpl
public QNodeImpl(Object content)
- Constructor, given the content of the node
- Parameters:
- content - the content of the node
QNodeImpl
public QNodeImpl(Object content,
QNodeImpl p,
QNodeImpl n)
- Constructor, given the content of the node, and both links
- Parameters:
- content - the content of the node
- p - the previous link
- n - the next link
remove
public void remove()
- Method remove() will remove the current node from the queue.
insert
public void insert(QNodeImpl prevnode,
QNodeImpl nextnode)
- Method insert() will insert the current node into the queue,
given the previous node, and the next node.
- Parameters:
- prevnode - the previous node
- nextnode - the next node
All Packages Class Hierarchy This Package Previous Next Index