|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DoubleOrderedLinkedList
Creates Double Linked List and an Iterator for this list.
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 |
|
Field Detail |
private int size
private DoubleOrderedLinkedList.Node first
Constructor Detail |
protected DoubleOrderedLinkedList()
Method Detail |
public int size()
size
in interface OrderedLinkedList
public java.lang.Object getElement(DoubleOrderedLinkedList.Node n)
Node
- to return element forpublic void insert(java.lang.Comparable c)
insert
in interface OrderedLinkedList
Comparable
- to insert
Note: Sorting not fully implemented.public BidirectionalIterator iterator()
iterator
in interface OrderedLinkedList
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |