Class IterableSequence<T>
java.lang.Object
ste.lloop.AbstractSequence<ForwardOnlySequence<T>, T>
ste.lloop.ForwardOnlySequence<T>
ste.lloop.IterableSequence<T>
- Type Parameters:
T- the type of the elements in the iterable
A sequence that loops over an iterable and can only go forward.
-
Field Summary
Fields inherited from class ste.lloop.AbstractSequence
indexes -
Constructor Summary
ConstructorsConstructorDescriptionIterableSequence(Iterable<T> iterable) Creates a new sequence for the given iterable. -
Method Summary
Modifier and TypeMethodDescription<R> Rloop(BiConsumer<Integer, T> consumer) Executes the given consumer for each element in the loop.Methods inherited from class ste.lloop.ForwardOnlySequence
from, loop, step, to
-
Constructor Details
-
IterableSequence
-
-
Method Details
-
loop
Executes the given consumer for each element in the loop.If the iterable provided to the constructor was
null, this method will do nothing.- Specified by:
loopin classForwardOnlySequence<T>- Type Parameters:
R- the type of the return value- Parameters:
consumer- the consumer to execute for each element- Returns:
- the value passed to
Loop._break_(Object...), ornullif the loop completes without a_break_
-