|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object structure.AbstractIterator structure.DoublyLinkedListIterator
public class DoublyLinkedListIterator
A private iterator for traversing a doubly linked list.
Constructor Summary | |
---|---|
DoublyLinkedListIterator(DoublyLinkedListElement h)
Construct an iterator over a doubly linked list hanging from head. |
|
DoublyLinkedListIterator(DoublyLinkedListElement headDummy,
DoublyLinkedListElement tailDummy)
|
Method Summary | |
---|---|
Object |
get()
Get reference to value that is current. |
boolean |
hasNext()
Determine if there are more elements to be considered. |
Object |
next()
Returns reference to the current element, then increments iterator. |
void |
reset()
Reset the iterator to the head of the list. |
Methods inherited from class structure.AbstractIterator |
---|
hasMoreElements, nextElement, remove, value |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoublyLinkedListIterator(DoublyLinkedListElement h)
h
- The head of the list to be traversed.public DoublyLinkedListIterator(DoublyLinkedListElement headDummy, DoublyLinkedListElement tailDummy)
Method Detail |
---|
public void reset()
reset
in class AbstractIterator
public boolean hasNext()
hasNext
in interface Iterator
hasNext
in class AbstractIterator
AbstractIterator.hasMoreElements()
public Object next()
next
in interface Iterator
next
in class AbstractIterator
AbstractIterator.hasMoreElements()
,
AbstractIterator.value()
public Object get()
get
in class AbstractIterator
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |