E - The type of the element being iterated over.public abstract class Iterator<E> extends Object implements 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 |
getNext()
This method returns the element after the slot where the iterator is currently
pointing.
|
abstract E |
getPrevious()
This method returns the element before the slot where the iterator is currently
pointing.
|
abstract boolean |
hasNext()
This method determines if the iterator is currently pointing at a slot just before
an element in this sequence.
|
abstract boolean |
hasPrevious()
This method determines if the iterator is currently pointing at a slot just after
an element in this sequence.
|
E |
next() |
void |
remove() |
abstract void |
toEnd()
This method moves the iterator to the slot just past the last element in this
sequence.
|
abstract void |
toIndex(int index)
This method moves the iterator to the slot just before the specified index.
|
abstract void |
toStart()
This method moves the iterator to just before the first element in this sequence.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic abstract void toStart()
public abstract void toIndex(int index)
index - The index of the element to be returned next by the iterator.public abstract void toEnd()
public abstract boolean hasPrevious()
false.public abstract E getPrevious()
public abstract boolean hasNext()
false.public abstract E getNext()
Copyright © 2016 Crater Dog Technologies(TM). All rights reserved.