|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.cursors.AbstractStartCursor<T>
T
- @Immutable public abstract class AbstractStartCursor<T>
Base implementation for unstarted Cursor classes. Derived classes generally override the next() method to start the traversal. Once the end of the traversal is reached returning super.next() will end the traversal.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.javimmutable.collections.Cursor |
---|
Cursor.NotStartedException, Cursor.NoValueException |
Constructor Summary | |
---|---|
AbstractStartCursor()
|
Method Summary | |
---|---|
T |
getValue()
Return the value at the Cursor's position. |
boolean |
hasValue()
Read-only method with no side effects that determines if the Cursor currently has a value. |
Iterator<T> |
iterator()
|
Cursor<T> |
next()
Advances to the next (possibly first) value. |
Cursor<T> |
start()
All Cursors are created in a pre-start position pointing "before" the first element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractStartCursor()
Method Detail |
---|
@Nonnull public Cursor<T> start()
Cursor
start
in interface Cursor<T>
@Nonnull public Cursor<T> next()
Cursor
next
in interface Cursor<T>
public boolean hasValue()
Cursor
hasValue
in interface Cursor<T>
public T getValue()
Cursor
getValue
in interface Cursor<T>
public Iterator<T> iterator()
iterator
in interface Iterable<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |