Class LazyTakeIterable<T>
java.lang.Object
de.renebergelt.quiterables.iterators.LazyTakeIterable<T>
- Type Parameters:
T- Type of the elements in this Iterable
- All Implemented Interfaces:
Iterable<T>
Iterable which takes a certain amount of elements or
takes as long as all elements match a predicate
- Author:
- René Bergelt
-
Constructor Summary
ConstructorsConstructorDescriptionLazyTakeIterable(Iterable<T> _wrapped, int _amount)Create a new lazy take iterable which wraps the given iterableLazyTakeIterable(Iterable<T> _wrapped, Predicate<T> _takeWhileCondition)Create a new lazy take iterable which wraps the given iterable -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LazyTakeIterable
Create a new lazy take iterable which wraps the given iterable- Parameters:
_wrapped- The wrapped iterable_amount- Number of elements to take
-
LazyTakeIterable
Create a new lazy take iterable which wraps the given iterable- Parameters:
_wrapped- The wrapped iterable_takeWhileCondition- Condition to take an element from the beginning
-
-
Method Details