Class LazyIterableAdapter<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.lazy.AbstractLazyIterable<T>
-
- org.eclipse.collections.impl.lazy.LazyIterableAdapter<T>
-
- All Implemented Interfaces:
Iterable<T>,InternalIterable<T>,LazyIterable<T>,RichIterable<T>
public class LazyIterableAdapter<T> extends AbstractLazyIterable<T>
A LazyIterableAdapter wraps any iterable with the LazyIterable interface.
-
-
Constructor Summary
Constructors Constructor Description LazyIterableAdapter(Iterable<T> newAdapted)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(Predicate<? super T> predicate)<P> booleanallSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)booleananySatisfy(Predicate<? super T> predicate)<P> booleananySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)<V> LazyIterable<V>collect(Function<? super T,? extends V> function)<V> LazyIterable<V>collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)Tdetect(Predicate<? super T> predicate)Optional<T>detectOptional(Predicate<? super T> predicate)<P> TdetectWith(Predicate2<? super T,? super P> predicate, P parameter)<P> Optional<T>detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)LazyIterable<T>distinct()LazyIterable<T>drop(int count)LazyIterable<T>dropWhile(Predicate<? super T> predicate)voideach(Procedure<? super T> procedure)<V> LazyIterable<V>flatCollect(Function<? super T,? extends Iterable<V>> function)<P> voidforEachWith(Procedure2<? super T,? super P> procedure, P parameter)voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)TgetFirst()TgetLast()<R extends Collection<T>>
Rinto(R target)booleanisEmpty()Iterator<T>iterator()booleannoneSatisfy(Predicate<? super T> predicate)<P> booleannoneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)LazyIterable<T>reject(Predicate<? super T> predicate)LazyIterable<T>select(Predicate<? super T> predicate)intsize()LazyIterable<T>take(int count)LazyIterable<T>takeWhile(Predicate<? super T> predicate)Object[]toArray()-
Methods inherited from class org.eclipse.collections.impl.lazy.AbstractLazyIterable
asLazy, chunk, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWith, concatenate, getOnly, groupBy, groupByEach, groupByUniqueKey, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, partition, partitionWith, rejectWith, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, tap, toArray, toStack, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countByEach, countWith, detectWithIfNone, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface java.lang.Iterable
spliterator
-
Methods inherited from interface org.eclipse.collections.api.LazyIterable
flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateBy, aggregateInPlaceBy, appendString, appendString, appendString, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detectIfNone, detectWithIfNone, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
-
-
-
Method Detail
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
forEachWith
public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<T>
-
into
public <R extends Collection<T>> R into(R target)
- Specified by:
intoin interfaceLazyIterable<T>- Specified by:
intoin interfaceRichIterable<T>- Overrides:
intoin classAbstractLazyIterable<T>
-
select
public LazyIterable<T> select(Predicate<? super T> predicate)
- Specified by:
selectin interfaceLazyIterable<T>- Specified by:
selectin interfaceRichIterable<T>- Overrides:
selectin classAbstractLazyIterable<T>
-
reject
public LazyIterable<T> reject(Predicate<? super T> predicate)
- Specified by:
rejectin interfaceLazyIterable<T>- Specified by:
rejectin interfaceRichIterable<T>- Overrides:
rejectin classAbstractLazyIterable<T>
-
collect
public <V> LazyIterable<V> collect(Function<? super T,? extends V> function)
- Specified by:
collectin interfaceLazyIterable<T>- Specified by:
collectin interfaceRichIterable<T>- Overrides:
collectin classAbstractLazyIterable<T>
-
flatCollect
public <V> LazyIterable<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollectin interfaceLazyIterable<T>- Specified by:
flatCollectin interfaceRichIterable<T>- Overrides:
flatCollectin classAbstractLazyIterable<T>
-
collectIf
public <V> LazyIterable<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIfin interfaceLazyIterable<T>- Specified by:
collectIfin interfaceRichIterable<T>- Overrides:
collectIfin classAbstractLazyIterable<T>
-
take
public LazyIterable<T> take(int count)
- Specified by:
takein interfaceLazyIterable<T>- Overrides:
takein classAbstractLazyIterable<T>
-
drop
public LazyIterable<T> drop(int count)
- Specified by:
dropin interfaceLazyIterable<T>- Overrides:
dropin classAbstractLazyIterable<T>
-
takeWhile
public LazyIterable<T> takeWhile(Predicate<? super T> predicate)
- Specified by:
takeWhilein interfaceLazyIterable<T>- Overrides:
takeWhilein classAbstractLazyIterable<T>
-
dropWhile
public LazyIterable<T> dropWhile(Predicate<? super T> predicate)
- Specified by:
dropWhilein interfaceLazyIterable<T>- Overrides:
dropWhilein classAbstractLazyIterable<T>
-
distinct
public LazyIterable<T> distinct()
- Specified by:
distinctin interfaceLazyIterable<T>- Overrides:
distinctin classAbstractLazyIterable<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceRichIterable<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
size
public int size()
- Specified by:
sizein interfaceRichIterable<T>- Overrides:
sizein classAbstractLazyIterable<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceRichIterable<T>- Overrides:
isEmptyin classAbstractLazyIterable<T>
-
anySatisfy
public boolean anySatisfy(Predicate<? super T> predicate)
- Specified by:
anySatisfyin interfaceRichIterable<T>- Overrides:
anySatisfyin classAbstractRichIterable<T>
-
allSatisfy
public boolean allSatisfy(Predicate<? super T> predicate)
- Specified by:
allSatisfyin interfaceRichIterable<T>- Overrides:
allSatisfyin classAbstractRichIterable<T>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super T> predicate)
- Specified by:
noneSatisfyin interfaceRichIterable<T>- Overrides:
noneSatisfyin classAbstractRichIterable<T>
-
anySatisfyWith
public <P> boolean anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
anySatisfyWithin interfaceRichIterable<T>- Overrides:
anySatisfyWithin classAbstractRichIterable<T>
-
allSatisfyWith
public <P> boolean allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
allSatisfyWithin interfaceRichIterable<T>- Overrides:
allSatisfyWithin classAbstractRichIterable<T>
-
noneSatisfyWith
public <P> boolean noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
noneSatisfyWithin interfaceRichIterable<T>- Overrides:
noneSatisfyWithin classAbstractRichIterable<T>
-
getFirst
public T getFirst()
- Specified by:
getFirstin interfaceLazyIterable<T>- Specified by:
getFirstin interfaceRichIterable<T>- Overrides:
getFirstin classAbstractLazyIterable<T>
-
getLast
public T getLast()
- Specified by:
getLastin interfaceRichIterable<T>- Overrides:
getLastin classAbstractLazyIterable<T>
-
detect
public T detect(Predicate<? super T> predicate)
- Specified by:
detectin interfaceRichIterable<T>- Overrides:
detectin classAbstractRichIterable<T>
-
detectWith
public <P> T detectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWithin interfaceRichIterable<T>- Overrides:
detectWithin classAbstractRichIterable<T>
-
detectOptional
public Optional<T> detectOptional(Predicate<? super T> predicate)
- Specified by:
detectOptionalin interfaceRichIterable<T>- Overrides:
detectOptionalin classAbstractRichIterable<T>
-
detectWithOptional
public <P> Optional<T> detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWithOptionalin interfaceRichIterable<T>- Overrides:
detectWithOptionalin classAbstractRichIterable<T>
-
-