org.javimmutable.collections.cursors
Interface StandardCursor.Source<T>
- Type Parameters:
T
-
- Enclosing class:
- StandardCursor
public static interface StandardCursor.Source<T>
Simple interface for classes that can iterate immediately (i.e. do not require a lazy start).
A Source must start already pointing at a current value.
Implementations of this interface must be immutable.
atEnd
boolean atEnd()
- Returns:
- true iff a call to advance() will fail
currentValue
T currentValue()
- Returns:
- current value
advance
StandardCursor.Source<T> advance()
- Returns:
- new Source pointing at the next value or throw if no next value available
Copyright © 2014 Burton Computer Corporation. All rights reserved.