Class IterableIterate
- java.lang.Object
-
- org.eclipse.collections.impl.utility.internal.IterableIterate
-
public final class IterableIterate extends java.lang.Object
The IterableIterate class provides a few of the methods from the Smalltalk Collection Protocol for use with general Collection classes. This includes do:, select:, reject:, collect:, inject:into:, detect:, detect:ifNone:, anySatisfy: and allSatisfy:
-
-
Constructor Summary
Constructors Modifier Constructor Description private
IterableIterate()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T,K,V>
MutableMap<K,V>aggregateBy(java.lang.Iterable<T> iterable, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V,? super T,? extends V> nonMutatingAggregator)
static <T,K,V>
MutableMap<K,V>aggregateInPlaceBy(java.lang.Iterable<T> iterable, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
static <T> boolean
allSatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,P>
booleanallSatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T> boolean
anySatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,P>
booleananySatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T> void
appendString(java.lang.Iterable<T> iterable, java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
static <T> RichIterable<RichIterable<T>>
chunk(java.lang.Iterable<T> iterable, int size)
static <T,V>
MutableList<V>collect(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
static <T,V,R extends java.util.Collection<V>>
Rcollect(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function, R targetCollection)
static <T> MutableBooleanCollection
collectBoolean(java.lang.Iterable<T> iterable, BooleanFunction<? super T> booleanFunction)
static <T,R extends MutableBooleanCollection>
RcollectBoolean(java.lang.Iterable<T> iterable, BooleanFunction<? super T> booleanFunction, R target)
static <T> MutableByteCollection
collectByte(java.lang.Iterable<T> iterable, ByteFunction<? super T> byteFunction)
static <T,R extends MutableByteCollection>
RcollectByte(java.lang.Iterable<T> iterable, ByteFunction<? super T> byteFunction, R target)
static <T> MutableCharCollection
collectChar(java.lang.Iterable<T> iterable, CharFunction<? super T> charFunction)
static <T,R extends MutableCharCollection>
RcollectChar(java.lang.Iterable<T> iterable, CharFunction<? super T> charFunction, R target)
static <T> MutableDoubleCollection
collectDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> doubleFunction)
static <T,R extends MutableDoubleCollection>
RcollectDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> doubleFunction, R target)
static <T> MutableFloatCollection
collectFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> floatFunction)
static <T,R extends MutableFloatCollection>
RcollectFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> floatFunction, R target)
static <T,V>
MutableList<V>collectIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Function<? super T,? extends V> function)
static <T,V,R extends java.util.Collection<V>>
RcollectIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Function<? super T,? extends V> function, R targetCollection)
static <T> MutableIntCollection
collectInt(java.lang.Iterable<T> iterable, IntFunction<? super T> intFunction)
static <T,R extends MutableIntCollection>
RcollectInt(java.lang.Iterable<T> iterable, IntFunction<? super T> intFunction, R target)
static <T> MutableLongCollection
collectLong(java.lang.Iterable<T> iterable, LongFunction<? super T> longFunction)
static <T,R extends MutableLongCollection>
RcollectLong(java.lang.Iterable<T> iterable, LongFunction<? super T> longFunction, R target)
static <T> MutableShortCollection
collectShort(java.lang.Iterable<T> iterable, ShortFunction<? super T> shortFunction)
static <T,R extends MutableShortCollection>
RcollectShort(java.lang.Iterable<T> iterable, ShortFunction<? super T> shortFunction, R target)
static <T,P,A,R extends java.util.Collection<A>>
RcollectWith(java.lang.Iterable<T> iterable, Function2<? super T,? super P,? extends A> function, P parameter, R targetCollection)
static <T,P,V>
MutableList<V>collectWith(java.lang.Iterable<T> iterable, Function2<? super T,? super P,? extends V> function, P parameter)
static <T> int
count(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,IV>
intcountWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
static <T> T
detect(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T> int
detectIndex(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,IV>
intdetectIndexWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
static <T> java.util.Optional<T>
detectOptional(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,P>
TdetectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T,P>
java.util.Optional<T>detectWithOptional(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T> MutableList<T>
distinct(java.lang.Iterable<T> iterable)
static <T> MutableList<T>
distinct(java.lang.Iterable<T> iterable, HashingStrategy<? super T> hashingStrategy)
static <T,R extends java.util.List<T>>
Rdistinct(java.lang.Iterable<T> iterable, R targetCollection)
Deprecated.in 7.0.static <T> java.util.Collection<T>
drop(java.lang.Iterable<T> list, int count)
static <T,R extends java.util.Collection<T>>
Rdrop(java.lang.Iterable<T> iterable, int count, R targetCollection)
static <T,R extends MutableCollection<T>>
RdropWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
static <T,V>
MutableList<V>flatCollect(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function)
static <T,V,R extends java.util.Collection<V>>
RflatCollect(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function, R targetCollection)
static <T> void
forEach(java.lang.Iterable<T> iterable, int from, int to, Procedure<? super T> procedure)
static <T> void
forEach(java.lang.Iterable<T> iterable, Procedure<? super T> procedure)
static <T,P>
voidforEachWith(java.lang.Iterable<T> iterable, Procedure2<? super T,? super P> procedure, P parameter)
static <T> void
forEachWithIndex(java.lang.Iterable<T> iterable, ObjectIntProcedure<? super T> objectIntProcedure)
static <T> void
forEachWithIndex(java.util.List<T> iterable, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)
static <T> T
getFirst(java.lang.Iterable<T> iterable)
static <T> T
getLast(java.lang.Iterable<T> iterable)
static <T> T
getOnly(java.lang.Iterable<T> iterable)
static <T,V>
FastListMultimap<V,T>groupBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
static <T,V,R extends MutableMultimap<V,T>>
RgroupBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function, R target)
static <T,V>
FastListMultimap<V,T>groupByEach(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function)
static <T,V,R extends MutableMultimap<V,T>>
RgroupByEach(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function, R target)
static <K,T>
MutableMap<K,T>groupByUniqueKey(java.lang.Iterable<T> iterable, Function<? super T,? extends K> function)
static <K,T,R extends MutableMapIterable<K,T>>
RgroupByUniqueKey(java.lang.Iterable<T> iterable, Function<? super T,? extends K> function, R target)
static <T> double
injectInto(double injectValue, java.lang.Iterable<T> iterable, DoubleObjectToDoubleFunction<? super T> function)
static <T> float
injectInto(float injectValue, java.lang.Iterable<T> iterable, FloatObjectToFloatFunction<? super T> function)
static <T> int
injectInto(int injectValue, java.lang.Iterable<T> iterable, IntObjectToIntFunction<? super T> function)
static <T> long
injectInto(long injectValue, java.lang.Iterable<T> iterable, LongObjectToLongFunction<? super T> function)
static <T,IV>
IVinjectInto(IV injectValue, java.lang.Iterable<T> iterable, Function2<? super IV,? super T,? extends IV> function)
static <T,IV,P>
IVinjectIntoWith(IV injectValue, java.lang.Iterable<T> iterable, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
static boolean
isEmpty(java.lang.Iterable<?> iterable)
static <T> T
max(java.lang.Iterable<T> iterable)
static <T> T
max(java.lang.Iterable<T> iterable, java.util.Comparator<? super T> comparator)
static <T,V extends java.lang.Comparable<? super V>>
TmaxBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
static <T> T
min(java.lang.Iterable<T> iterable)
static <T> T
min(java.lang.Iterable<T> iterable, java.util.Comparator<? super T> comparator)
static <T,V extends java.lang.Comparable<? super V>>
TminBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
static <T> boolean
noneSatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,P>
booleannoneSatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static boolean
notEmpty(java.lang.Iterable<?> iterable)
static <T> PartitionMutableList<T>
partition(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,R extends PartitionMutableCollection<T>>
RpartitionWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
static <T,P>
PartitionMutableList<T>partitionWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T> MutableList<T>
reject(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,R extends java.util.Collection<T>>
Rreject(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R targetCollection)
static <T,P,R extends java.util.Collection<T>>
RrejectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
static <T> boolean
removeIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T> boolean
removeIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Procedure<? super T> procedure)
static <T,P>
booleanremoveIfWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
static <T,P>
booleanremoveIfWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter, Procedure<? super T> procedure)
static <T> MutableList<T>
select(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
static <T,R extends java.util.Collection<T>>
Rselect(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R targetCollection)
static <T,IV>
Twin<MutableList<T>>selectAndRejectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
static <T> MutableList<T>
selectInstancesOf(java.lang.Iterable<?> iterable, java.lang.Class<T> clazz)
static <T,R extends java.util.Collection<T>>
RselectInstancesOf(java.lang.Iterable<?> iterable, java.lang.Class<T> clazz, R targetCollection)
static <T,P,R extends java.util.Collection<T>>
RselectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P injectedValue, R targetCollection)
static <T> java.lang.String
stringValueOfItem(java.lang.Iterable<T> iterable, T item)
static <V,T>
MutableMap<V,java.math.BigDecimal>sumByBigDecimal(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, Function<? super T,java.math.BigDecimal> function)
static <V,T>
MutableMap<V,java.math.BigInteger>sumByBigInteger(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, Function<? super T,java.math.BigInteger> function)
static <V,T>
ObjectDoubleMap<V>sumByDouble(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
static <V,T>
ObjectDoubleMap<V>sumByFloat(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
static <V,T>
ObjectLongMap<V>sumByInt(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
static <V,T>
ObjectLongMap<V>sumByLong(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
static <T> java.math.BigDecimal
sumOfBigDecimal(java.lang.Iterable<T> iterable, Function<? super T,java.math.BigDecimal> function)
static <T> java.math.BigInteger
sumOfBigInteger(java.lang.Iterable<T> iterable, Function<? super T,java.math.BigInteger> function)
static <T> double
sumOfDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> function)
static <T> double
sumOfFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> function)
static <T> long
sumOfInt(java.lang.Iterable<T> iterable, IntFunction<? super T> function)
static <T> long
sumOfLong(java.lang.Iterable<T> iterable, LongFunction<? super T> function)
static <T> java.util.Collection<T>
take(java.lang.Iterable<T> iterable, int count)
static <T,R extends java.util.Collection<T>>
Rtake(java.lang.Iterable<T> iterable, int count, R targetCollection)
static <T,R extends MutableCollection<T>>
RtakeWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
static <X,Y>
MutableList<Pair<X,Y>>zip(java.lang.Iterable<X> xs, java.lang.Iterable<Y> ys)
static <X,Y,R extends java.util.Collection<Pair<X,Y>>>
Rzip(java.lang.Iterable<X> xs, java.lang.Iterable<Y> ys, R target)
static <T> MutableList<Pair<T,java.lang.Integer>>
zipWithIndex(java.lang.Iterable<T> iterable)
static <T,R extends java.util.Collection<Pair<T,java.lang.Integer>>>
RzipWithIndex(java.lang.Iterable<T> iterable, R target)
-
-
-
Method Detail
-
select
public static <T> MutableList<T> select(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.select(Iterable, Predicate)
-
selectAndRejectWith
public static <T,IV> Twin<MutableList<T>> selectAndRejectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
partition
public static <T> PartitionMutableList<T> partition(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.partition(Iterable, Predicate)
-
partitionWith
public static <T,P> PartitionMutableList<T> partitionWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
- Since:
- 5.0
- See Also:
Iterate.partitionWith(Iterable, Predicate2, Object)
-
partitionWhile
public static <T,R extends PartitionMutableCollection<T>> R partitionWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
-
takeWhile
public static <T,R extends MutableCollection<T>> R takeWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
-
dropWhile
public static <T,R extends MutableCollection<T>> R dropWhile(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R target)
-
count
public static <T> int count(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.count(Iterable, Predicate)
-
countWith
public static <T,IV> int countWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
collectIf
public static <T,V> MutableList<V> collectIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Function<? super T,? extends V> function)
-
isEmpty
public static boolean isEmpty(java.lang.Iterable<?> iterable)
-
notEmpty
public static boolean notEmpty(java.lang.Iterable<?> iterable)
-
getFirst
public static <T> T getFirst(java.lang.Iterable<T> iterable)
-
getLast
public static <T> T getLast(java.lang.Iterable<T> iterable)
-
select
public static <T,R extends java.util.Collection<T>> R select(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R targetCollection)
-
selectWith
public static <T,P,R extends java.util.Collection<T>> R selectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P injectedValue, R targetCollection)
-
selectInstancesOf
public static <T> MutableList<T> selectInstancesOf(java.lang.Iterable<?> iterable, java.lang.Class<T> clazz)
-
selectInstancesOf
public static <T,R extends java.util.Collection<T>> R selectInstancesOf(java.lang.Iterable<?> iterable, java.lang.Class<T> clazz, R targetCollection)
-
collectIf
public static <T,V,R extends java.util.Collection<V>> R collectIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Function<? super T,? extends V> function, R targetCollection)
-
reject
public static <T> MutableList<T> reject(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.reject(Iterable, Predicate)
-
reject
public static <T,R extends java.util.Collection<T>> R reject(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, R targetCollection)
-
rejectWith
public static <T,P,R extends java.util.Collection<T>> R rejectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
-
collect
public static <T,V> MutableList<V> collect(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
- See Also:
Iterate.collect(Iterable, Function)
-
collect
public static <T,V,R extends java.util.Collection<V>> R collect(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function, R targetCollection)
-
collectBoolean
public static <T> MutableBooleanCollection collectBoolean(java.lang.Iterable<T> iterable, BooleanFunction<? super T> booleanFunction)
-
collectBoolean
public static <T,R extends MutableBooleanCollection> R collectBoolean(java.lang.Iterable<T> iterable, BooleanFunction<? super T> booleanFunction, R target)
-
collectByte
public static <T> MutableByteCollection collectByte(java.lang.Iterable<T> iterable, ByteFunction<? super T> byteFunction)
-
collectByte
public static <T,R extends MutableByteCollection> R collectByte(java.lang.Iterable<T> iterable, ByteFunction<? super T> byteFunction, R target)
-
collectChar
public static <T> MutableCharCollection collectChar(java.lang.Iterable<T> iterable, CharFunction<? super T> charFunction)
-
collectChar
public static <T,R extends MutableCharCollection> R collectChar(java.lang.Iterable<T> iterable, CharFunction<? super T> charFunction, R target)
-
collectDouble
public static <T> MutableDoubleCollection collectDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> doubleFunction)
-
collectDouble
public static <T,R extends MutableDoubleCollection> R collectDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> doubleFunction, R target)
-
collectFloat
public static <T> MutableFloatCollection collectFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> floatFunction)
-
collectFloat
public static <T,R extends MutableFloatCollection> R collectFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> floatFunction, R target)
-
collectInt
public static <T> MutableIntCollection collectInt(java.lang.Iterable<T> iterable, IntFunction<? super T> intFunction)
-
collectInt
public static <T,R extends MutableIntCollection> R collectInt(java.lang.Iterable<T> iterable, IntFunction<? super T> intFunction, R target)
-
collectLong
public static <T> MutableLongCollection collectLong(java.lang.Iterable<T> iterable, LongFunction<? super T> longFunction)
-
collectLong
public static <T,R extends MutableLongCollection> R collectLong(java.lang.Iterable<T> iterable, LongFunction<? super T> longFunction, R target)
-
collectShort
public static <T> MutableShortCollection collectShort(java.lang.Iterable<T> iterable, ShortFunction<? super T> shortFunction)
-
collectShort
public static <T,R extends MutableShortCollection> R collectShort(java.lang.Iterable<T> iterable, ShortFunction<? super T> shortFunction, R target)
-
flatCollect
public static <T,V> MutableList<V> flatCollect(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function)
- See Also:
Iterate.flatCollect(Iterable, Function)
-
flatCollect
public static <T,V,R extends java.util.Collection<V>> R flatCollect(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function, R targetCollection)
-
forEach
public static <T> void forEach(java.lang.Iterable<T> iterable, Procedure<? super T> procedure)
- See Also:
Iterate.forEach(Iterable, Procedure)
-
forEachWithIndex
public static <T> void forEachWithIndex(java.lang.Iterable<T> iterable, ObjectIntProcedure<? super T> objectIntProcedure)
-
injectInto
public static <T,IV> IV injectInto(IV injectValue, java.lang.Iterable<T> iterable, Function2<? super IV,? super T,? extends IV> function)
-
injectInto
public static <T> int injectInto(int injectValue, java.lang.Iterable<T> iterable, IntObjectToIntFunction<? super T> function)
-
injectInto
public static <T> long injectInto(long injectValue, java.lang.Iterable<T> iterable, LongObjectToLongFunction<? super T> function)
-
injectInto
public static <T> double injectInto(double injectValue, java.lang.Iterable<T> iterable, DoubleObjectToDoubleFunction<? super T> function)
-
injectInto
public static <T> float injectInto(float injectValue, java.lang.Iterable<T> iterable, FloatObjectToFloatFunction<? super T> function)
-
distinct
@Deprecated public static <T,R extends java.util.List<T>> R distinct(java.lang.Iterable<T> iterable, R targetCollection)
Deprecated.in 7.0.
-
distinct
public static <T> MutableList<T> distinct(java.lang.Iterable<T> iterable)
- Since:
- 7.0.
-
distinct
public static <T> MutableList<T> distinct(java.lang.Iterable<T> iterable, HashingStrategy<? super T> hashingStrategy)
- Since:
- 7.0.
-
sumOfInt
public static <T> long sumOfInt(java.lang.Iterable<T> iterable, IntFunction<? super T> function)
- See Also:
Iterate.sumOfInt(Iterable, IntFunction)
-
sumOfLong
public static <T> long sumOfLong(java.lang.Iterable<T> iterable, LongFunction<? super T> function)
-
sumOfFloat
public static <T> double sumOfFloat(java.lang.Iterable<T> iterable, FloatFunction<? super T> function)
-
sumOfDouble
public static <T> double sumOfDouble(java.lang.Iterable<T> iterable, DoubleFunction<? super T> function)
-
sumOfBigDecimal
public static <T> java.math.BigDecimal sumOfBigDecimal(java.lang.Iterable<T> iterable, Function<? super T,java.math.BigDecimal> function)
-
sumOfBigInteger
public static <T> java.math.BigInteger sumOfBigInteger(java.lang.Iterable<T> iterable, Function<? super T,java.math.BigInteger> function)
-
sumByBigDecimal
public static <V,T> MutableMap<V,java.math.BigDecimal> sumByBigDecimal(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, Function<? super T,java.math.BigDecimal> function)
-
sumByBigInteger
public static <V,T> MutableMap<V,java.math.BigInteger> sumByBigInteger(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, Function<? super T,java.math.BigInteger> function)
-
sumByInt
public static <V,T> ObjectLongMap<V> sumByInt(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
-
sumByLong
public static <V,T> ObjectLongMap<V> sumByLong(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
-
sumByFloat
public static <V,T> ObjectDoubleMap<V> sumByFloat(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
-
sumByDouble
public static <V,T> ObjectDoubleMap<V> sumByDouble(java.lang.Iterable<T> iterable, Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
-
injectIntoWith
public static <T,IV,P> IV injectIntoWith(IV injectValue, java.lang.Iterable<T> iterable, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
-
anySatisfy
public static <T> boolean anySatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
-
anySatisfyWith
public static <T,P> boolean anySatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
allSatisfy
public static <T> boolean allSatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
-
allSatisfyWith
public static <T,P> boolean allSatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
noneSatisfy
public static <T> boolean noneSatisfy(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
-
noneSatisfyWith
public static <T,P> boolean noneSatisfyWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
detect
public static <T> T detect(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
-
detectWith
public static <T,P> T detectWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
detectOptional
public static <T> java.util.Optional<T> detectOptional(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
-
detectWithOptional
public static <T,P> java.util.Optional<T> detectWithOptional(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
removeIf
public static <T> boolean removeIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.removeIf(Iterable, Predicate)
-
removeIfWith
public static <T,P> boolean removeIfWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter)
-
removeIf
public static <T> boolean removeIf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate, Procedure<? super T> procedure)
-
removeIfWith
public static <T,P> boolean removeIfWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super P> predicate, P parameter, Procedure<? super T> procedure)
-
detectIndex
public static <T> int detectIndex(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
- See Also:
Iterate.detectIndex(Iterable, Predicate)
-
detectIndexWith
public static <T,IV> int detectIndexWith(java.lang.Iterable<T> iterable, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
forEachWith
public static <T,P> void forEachWith(java.lang.Iterable<T> iterable, Procedure2<? super T,? super P> procedure, P parameter)
-
collectWith
public static <T,P,V> MutableList<V> collectWith(java.lang.Iterable<T> iterable, Function2<? super T,? super P,? extends V> function, P parameter)
-
collectWith
public static <T,P,A,R extends java.util.Collection<A>> R collectWith(java.lang.Iterable<T> iterable, Function2<? super T,? super P,? extends A> function, P parameter, R targetCollection)
-
take
public static <T> java.util.Collection<T> take(java.lang.Iterable<T> iterable, int count)
- See Also:
Iterate.take(Iterable, int)
-
take
public static <T,R extends java.util.Collection<T>> R take(java.lang.Iterable<T> iterable, int count, R targetCollection)
- See Also:
Iterate.take(Iterable, int)
-
drop
public static <T> java.util.Collection<T> drop(java.lang.Iterable<T> list, int count)
- See Also:
Iterate.drop(Iterable, int)
-
drop
public static <T,R extends java.util.Collection<T>> R drop(java.lang.Iterable<T> iterable, int count, R targetCollection)
- See Also:
Iterate.drop(Iterable, int)
-
appendString
public static <T> void appendString(java.lang.Iterable<T> iterable, java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
-
groupBy
public static <T,V> FastListMultimap<V,T> groupBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
- See Also:
Iterate.groupBy(Iterable, Function)
-
groupBy
public static <T,V,R extends MutableMultimap<V,T>> R groupBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function, R target)
-
groupByEach
public static <T,V> FastListMultimap<V,T> groupByEach(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function)
- See Also:
Iterate.groupByEach(Iterable, Function)
-
groupByEach
public static <T,V,R extends MutableMultimap<V,T>> R groupByEach(java.lang.Iterable<T> iterable, Function<? super T,? extends java.lang.Iterable<V>> function, R target)
-
groupByUniqueKey
public static <K,T> MutableMap<K,T> groupByUniqueKey(java.lang.Iterable<T> iterable, Function<? super T,? extends K> function)
-
groupByUniqueKey
public static <K,T,R extends MutableMapIterable<K,T>> R groupByUniqueKey(java.lang.Iterable<T> iterable, Function<? super T,? extends K> function, R target)
-
getOnly
public static <T> T getOnly(java.lang.Iterable<T> iterable)
-
zip
public static <X,Y> MutableList<Pair<X,Y>> zip(java.lang.Iterable<X> xs, java.lang.Iterable<Y> ys)
- See Also:
Iterate.zip(Iterable, Iterable)
-
zip
public static <X,Y,R extends java.util.Collection<Pair<X,Y>>> R zip(java.lang.Iterable<X> xs, java.lang.Iterable<Y> ys, R target)
-
zipWithIndex
public static <T> MutableList<Pair<T,java.lang.Integer>> zipWithIndex(java.lang.Iterable<T> iterable)
- See Also:
Iterate.zipWithIndex(Iterable)
-
zipWithIndex
public static <T,R extends java.util.Collection<Pair<T,java.lang.Integer>>> R zipWithIndex(java.lang.Iterable<T> iterable, R target)
-
chunk
public static <T> RichIterable<RichIterable<T>> chunk(java.lang.Iterable<T> iterable, int size)
- See Also:
Iterate.chunk(Iterable, int)
-
maxBy
public static <T,V extends java.lang.Comparable<? super V>> T maxBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
-
minBy
public static <T,V extends java.lang.Comparable<? super V>> T minBy(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
-
min
public static <T> T min(java.lang.Iterable<T> iterable, java.util.Comparator<? super T> comparator)
- See Also:
Iterate.min(Iterable, Comparator)
-
max
public static <T> T max(java.lang.Iterable<T> iterable, java.util.Comparator<? super T> comparator)
- See Also:
Iterate.max(Iterable, Comparator)
-
min
public static <T> T min(java.lang.Iterable<T> iterable)
- See Also:
Iterate.min(Iterable)
-
max
public static <T> T max(java.lang.Iterable<T> iterable)
- See Also:
Iterate.max(Iterable)
-
forEach
public static <T> void forEach(java.lang.Iterable<T> iterable, int from, int to, Procedure<? super T> procedure)
-
forEachWithIndex
public static <T> void forEachWithIndex(java.util.List<T> iterable, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)
-
stringValueOfItem
public static <T> java.lang.String stringValueOfItem(java.lang.Iterable<T> iterable, T item)
-
aggregateInPlaceBy
public static <T,K,V> MutableMap<K,V> aggregateInPlaceBy(java.lang.Iterable<T> iterable, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
-
aggregateBy
public static <T,K,V> MutableMap<K,V> aggregateBy(java.lang.Iterable<T> iterable, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V,? super T,? extends V> nonMutatingAggregator)
-
-