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.

Variable Index

 o elem
the element of the node
 o next
the next pointer
 o prev
the previous pointer

Constructor Index

 o QNodeImpl(Object)
Constructor, given the content of the node
 o QNodeImpl(Object, QNodeImpl, QNodeImpl)
Constructor, given the content of the node, and both links

Method Index

 o insert(QNodeImpl, QNodeImpl)
Method insert() will insert the current node into the queue, given the previous node, and the next node.
 o remove()
Method remove() will remove the current node from the queue.

Variables

 o elem
  public Object elem
the element of the node
 o prev
  public QNodeImpl prev
the previous pointer
 o next
  public QNodeImpl next
the next pointer

Constructors

 o QNodeImpl
  public QNodeImpl(Object content)
Constructor, given the content of the node
Parameters:
content - the content of the node
 o 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

Methods

 o remove
  public void remove()
Method remove() will remove the current node from the queue.
 o 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