Class CollectIterable<T,V>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.lazy.AbstractLazyIterable<V>
-
- org.eclipse.collections.impl.lazy.CollectIterable<T,V>
-
- All Implemented Interfaces:
Iterable<V>,InternalIterable<V>,LazyIterable<V>,RichIterable<V>
public class CollectIterable<T,V> extends AbstractLazyIterable<V>
A CollectIterable is an iterable that transforms a source iterable using a function as it iterates.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(Predicate<? super V> predicate)booleananySatisfy(Predicate<? super V> predicate)Vdetect(Predicate<? super V> predicate)Optional<V>detectOptional(Predicate<? super V> predicate)voideach(Procedure<? super V> procedure)<P> voidforEachWith(Procedure2<? super V,? super P> procedure, P parameter)voidforEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)VgetFirst()VgetLast()doubleinjectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> f)floatinjectInto(float injectedValue, FloatObjectToFloatFunction<? super V> f)intinjectInto(int injectedValue, IntObjectToIntFunction<? super V> f)longinjectInto(long injectedValue, LongObjectToLongFunction<? super V> f)<IV> IVinjectInto(IV injectedValue, Function2<? super IV,? super V,? extends IV> f)booleanisEmpty()Iterator<V>iterator()booleannoneSatisfy(Predicate<? super V> predicate)booleannotEmpty()intsize()-
Methods inherited from class org.eclipse.collections.impl.lazy.AbstractLazyIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, concatenate, distinct, drop, dropWhile, flatCollect, getOnly, groupBy, groupByEach, groupByUniqueKey, into, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, take, takeWhile, tap, toStack, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfyWith, anySatisfyWith, appendString, appendString, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countByEach, countWith, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, max, max, maxBy, min, min, minBy, noneSatisfyWith, 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, toArray, toArray, toImmutableBag, toImmutableList, toImmutableSet
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateBy, aggregateInPlaceBy, allSatisfyWith, anySatisfyWith, 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, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfyWith, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toImmutableBiMap, toImmutableMap, 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 V> objectIntProcedure)
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<V>
-
forEachWith
public <P> void forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<V>
-
size
public int size()
- Specified by:
sizein interfaceRichIterable<T>- Overrides:
sizein classAbstractLazyIterable<V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceRichIterable<T>- Overrides:
isEmptyin classAbstractLazyIterable<V>
-
notEmpty
public boolean notEmpty()
-
anySatisfy
public boolean anySatisfy(Predicate<? super V> predicate)
- Specified by:
anySatisfyin interfaceRichIterable<T>- Overrides:
anySatisfyin classAbstractRichIterable<V>
-
allSatisfy
public boolean allSatisfy(Predicate<? super V> predicate)
- Specified by:
allSatisfyin interfaceRichIterable<T>- Overrides:
allSatisfyin classAbstractRichIterable<V>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super V> predicate)
- Specified by:
noneSatisfyin interfaceRichIterable<T>- Overrides:
noneSatisfyin classAbstractRichIterable<V>
-
detect
public V detect(Predicate<? super V> predicate)
- Specified by:
detectin interfaceRichIterable<T>- Overrides:
detectin classAbstractRichIterable<V>
-
detectOptional
public Optional<V> detectOptional(Predicate<? super V> predicate)
- Specified by:
detectOptionalin interfaceRichIterable<T>- Overrides:
detectOptionalin classAbstractRichIterable<V>
-
injectInto
public <IV> IV injectInto(IV injectedValue, Function2<? super IV,? super V,? extends IV> f)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<V>
-
injectInto
public int injectInto(int injectedValue, IntObjectToIntFunction<? super V> f)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<V>
-
injectInto
public long injectInto(long injectedValue, LongObjectToLongFunction<? super V> f)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<V>
-
injectInto
public double injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> f)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<V>
-
injectInto
public float injectInto(float injectedValue, FloatObjectToFloatFunction<? super V> f)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<V>
-
getFirst
public V getFirst()
- Specified by:
getFirstin interfaceLazyIterable<T>- Specified by:
getFirstin interfaceRichIterable<T>- Overrides:
getFirstin classAbstractLazyIterable<V>
-
getLast
public V getLast()
- Specified by:
getLastin interfaceRichIterable<T>- Overrides:
getLastin classAbstractLazyIterable<V>
-
-