|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.cursors.MultiTransformCursor<S,T>
T
- @Immutable public class MultiTransformCursor<S,T>
Cursor that produces values by visiting all values in a Cursor of objects and using a Func1 on each object to produce a Cursor that is then visited to reach all of its elements. No values are precomputed so LazyCursors can be used to minimize memory consumption.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.javimmutable.collections.Cursor |
---|
Cursor.NotStartedException, Cursor.NoValueException |
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. |
|
static
|
of(Cursor<S> source,
Func1<S,Cursor<T>> transforminator)
|
|
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 |
Method Detail |
---|
public static <S,T> Cursor<T> of(Cursor<S> source, Func1<S,Cursor<T>> transforminator)
@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 |