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 boolean
allSatisfy(Predicate<? super V> predicate)
boolean
anySatisfy(Predicate<? super V> predicate)
V
detect(Predicate<? super V> predicate)
Optional<V>
detectOptional(Predicate<? super V> predicate)
void
each(Procedure<? super V> procedure)
<P> void
forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
void
forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
V
getFirst()
V
getLast()
double
injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> f)
float
injectInto(float injectedValue, FloatObjectToFloatFunction<? super V> f)
int
injectInto(int injectedValue, IntObjectToIntFunction<? super V> f)
long
injectInto(long injectedValue, LongObjectToLongFunction<? super V> f)
<IV> IV
injectInto(IV injectedValue, Function2<? super IV,? super V,? extends IV> f)
boolean
isEmpty()
Iterator<V>
iterator()
boolean
noneSatisfy(Predicate<? super V> predicate)
boolean
notEmpty()
int
size()
Object[]
toArray()
-
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, toArray, 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
-
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, 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 V> objectIntProcedure)
- Specified by:
forEachWithIndex
in interfaceInternalIterable<T>
- Overrides:
forEachWithIndex
in classAbstractRichIterable<V>
-
forEachWith
public <P> void forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
- Specified by:
forEachWith
in interfaceInternalIterable<T>
- Overrides:
forEachWith
in classAbstractRichIterable<V>
-
size
public int size()
- Specified by:
size
in interfaceRichIterable<T>
- Overrides:
size
in classAbstractLazyIterable<V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceRichIterable<T>
- Overrides:
isEmpty
in classAbstractLazyIterable<V>
-
notEmpty
public boolean notEmpty()
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceRichIterable<T>
- Overrides:
toArray
in classAbstractRichIterable<V>
-
anySatisfy
public boolean anySatisfy(Predicate<? super V> predicate)
- Specified by:
anySatisfy
in interfaceRichIterable<T>
- Overrides:
anySatisfy
in classAbstractRichIterable<V>
-
allSatisfy
public boolean allSatisfy(Predicate<? super V> predicate)
- Specified by:
allSatisfy
in interfaceRichIterable<T>
- Overrides:
allSatisfy
in classAbstractRichIterable<V>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super V> predicate)
- Specified by:
noneSatisfy
in interfaceRichIterable<T>
- Overrides:
noneSatisfy
in classAbstractRichIterable<V>
-
detect
public V detect(Predicate<? super V> predicate)
- Specified by:
detect
in interfaceRichIterable<T>
- Overrides:
detect
in classAbstractRichIterable<V>
-
detectOptional
public Optional<V> detectOptional(Predicate<? super V> predicate)
- Specified by:
detectOptional
in interfaceRichIterable<T>
- Overrides:
detectOptional
in classAbstractRichIterable<V>
-
injectInto
public <IV> IV injectInto(IV injectedValue, Function2<? super IV,? super V,? extends IV> f)
- Specified by:
injectInto
in interfaceRichIterable<T>
- Overrides:
injectInto
in classAbstractRichIterable<V>
-
injectInto
public int injectInto(int injectedValue, IntObjectToIntFunction<? super V> f)
- Specified by:
injectInto
in interfaceRichIterable<T>
- Overrides:
injectInto
in classAbstractRichIterable<V>
-
injectInto
public long injectInto(long injectedValue, LongObjectToLongFunction<? super V> f)
- Specified by:
injectInto
in interfaceRichIterable<T>
- Overrides:
injectInto
in classAbstractRichIterable<V>
-
injectInto
public double injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> f)
- Specified by:
injectInto
in interfaceRichIterable<T>
- Overrides:
injectInto
in classAbstractRichIterable<V>
-
injectInto
public float injectInto(float injectedValue, FloatObjectToFloatFunction<? super V> f)
- Specified by:
injectInto
in interfaceRichIterable<T>
- Overrides:
injectInto
in classAbstractRichIterable<V>
-
getFirst
public V getFirst()
- Specified by:
getFirst
in interfaceLazyIterable<T>
- Specified by:
getFirst
in interfaceRichIterable<T>
- Overrides:
getFirst
in classAbstractLazyIterable<V>
-
getLast
public V getLast()
- Specified by:
getLast
in interfaceRichIterable<T>
- Overrides:
getLast
in classAbstractLazyIterable<V>
-
-