Class DoubleOrderedLinkedList

java.lang.Object
  |
  +--DoubleOrderedLinkedList
All Implemented Interfaces:
OrderedLinkedList

class DoubleOrderedLinkedList
extends java.lang.Object
implements OrderedLinkedList

Creates Double Linked List and an Iterator for this list.

Version:
BETA 26-SEP-2003 This class is unfinished and BETA.
Author:
Ned Martin 40529927

Inner Class Summary
private  class DoubleOrderedLinkedList.DoubleLinkedListIterator
          List iterator implementing BidirectionalIterator
private  class DoubleOrderedLinkedList.Node
          Make node
 
Field Summary
private  DoubleOrderedLinkedList.Node first
           
private  int size
           
 
Constructor Summary
protected DoubleOrderedLinkedList()
          Creates an empty linked list
 
Method Summary
 java.lang.Object getElement(DoubleOrderedLinkedList.Node n)
          Returns an element for specified Node
 void insert(java.lang.Comparable c)
          Insert an element into a Node in order.
 BidirectionalIterator iterator()
          Returns a BidirectionalIterator over the list
 int size()
          Stores number of Nodes in linked list
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

size

private int size

first

private DoubleOrderedLinkedList.Node first
Constructor Detail

DoubleOrderedLinkedList

protected DoubleOrderedLinkedList()
Creates an empty linked list
Method Detail

size

public int size()
Stores number of Nodes in linked list
Specified by:
size in interface OrderedLinkedList
Returns:
integer number of Nodes in linked list

getElement

public java.lang.Object getElement(DoubleOrderedLinkedList.Node n)
Returns an element for specified Node
Parameters:
Node - to return element for
Returns:
Element of Node

insert

public void insert(java.lang.Comparable c)
Insert an element into a Node in order. Note: Order not fully implemented.
Specified by:
insert in interface OrderedLinkedList
Parameters:
Comparable - to insert Note: Sorting not fully implemented.

iterator

public BidirectionalIterator iterator()
Returns a BidirectionalIterator over the list
Specified by:
iterator in interface OrderedLinkedList
Returns:
BidirectionalIterator over list