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