E - The type of the element being iterated over.public abstract class Iterator<E>
extends java.lang.Object
implements java.util.Iterator<E>
[element 1] [element 2] [element 3] ... [element N]
^ ^ ^ ^ ^ ^
at start at end
| Constructor and Description |
|---|
Iterator() |
| Modifier and Type | Method and Description |
|---|---|
abstract E |
getNextElement()
This method returns the element after the slot where the iterator is currently
pointing.
|
abstract E |
getPreviousElement()
This method returns the element before the slot where the iterator is currently
pointing.
|
abstract void |
goToEnd()
This method moves the iterator to the slot just past the last element in this
collection.
|
abstract void |
goToIndex(int index)
This method moves the iterator to the slot just before the specified index.
|
abstract void |
goToStart()
This method moves the iterator to just before the first element in this collection.
|
boolean |
hasNext() |
abstract boolean |
hasNextElement()
This method determines if the iterator is currently pointing at a slot just before
an element in this collection.
|
abstract boolean |
hasPreviousElement()
This method determines if the iterator is currently pointing at a slot just after
an element in this collection.
|
E |
next() |
void |
remove() |
public abstract void goToStart()
public abstract void goToIndex(int index)
index - This index of element to be returned next by the iterator.public abstract void goToEnd()
public abstract boolean hasPreviousElement()
false.public abstract boolean hasNextElement()
false.public abstract E getNextElement()
public abstract E getPreviousElement()
public final boolean hasNext()
hasNext in interface java.util.Iterator<E>public final void remove()
remove in interface java.util.Iterator<E>Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.