Class ArrayIterate
java.lang.Object
org.eclipse.collections.impl.utility.ArrayIterate
public final class ArrayIterate extends Object
This utility class provides iteration pattern implementations that work with Java arrays.
- Since:
- 1.0
-
Method Summary
Modifier and Type Method Description static <T, R extends Collection<T>>
RaddAllTo(T[] objectArray, R targetCollection)static <T> booleanallSatisfy(T[] objectArray, Predicate<? super T> predicate)static <T, P> booleanallSatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static <T> booleananySatisfy(T[] objectArray, Predicate<? super T> predicate)static <T, P> booleananySatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static <T> voidappendString(T[] array, Appendable appendable)static <T> voidappendString(T[] array, Appendable appendable, String separator)static <T> voidappendString(T[] array, Appendable appendable, String start, String separator, String end)static <T> RichIterable<RichIterable<T>>chunk(T[] array, int size)static <T, V> MutableList<V>collect(T[] objectArray, Function<? super T,? extends V> function)static <T, V, R extends Collection<V>>
Rcollect(T[] objectArray, Function<? super T,? extends V> function, R targetCollection)static <T> MutableBooleanListcollectBoolean(T[] objectArray, BooleanFunction<? super T> booleanFunction)static <T, R extends MutableBooleanCollection>
RcollectBoolean(T[] objectArray, BooleanFunction<? super T> booleanFunction, R target)static <T> MutableByteListcollectByte(T[] objectArray, ByteFunction<? super T> byteFunction)static <T, R extends MutableByteCollection>
RcollectByte(T[] objectArray, ByteFunction<? super T> byteFunction, R target)static <T> MutableCharListcollectChar(T[] objectArray, CharFunction<? super T> charFunction)static <T, R extends MutableCharCollection>
RcollectChar(T[] objectArray, CharFunction<? super T> charFunction, R target)static <T> MutableDoubleListcollectDouble(T[] objectArray, DoubleFunction<? super T> doubleFunction)static <T, R extends MutableDoubleCollection>
RcollectDouble(T[] objectArray, DoubleFunction<? super T> doubleFunction, R target)static <T> MutableFloatListcollectFloat(T[] objectArray, FloatFunction<? super T> floatFunction)static <T, R extends MutableFloatCollection>
RcollectFloat(T[] objectArray, FloatFunction<? super T> floatFunction, R target)static <T, V> MutableList<V>collectIf(T[] objectArray, Predicate<? super T> predicate, Function<? super T,? extends V> function)static <T, V, R extends Collection<V>>
RcollectIf(T[] objectArray, Predicate<? super T> predicate, Function<? super T,? extends V> function, R targetCollection)static <T> MutableIntListcollectInt(T[] objectArray, IntFunction<? super T> intFunction)static <T, R extends MutableIntCollection>
RcollectInt(T[] objectArray, IntFunction<? super T> intFunction, R target)static <T> MutableLongListcollectLong(T[] objectArray, LongFunction<? super T> longFunction)static <T, R extends MutableLongCollection>
RcollectLong(T[] objectArray, LongFunction<? super T> longFunction, R target)static <T> MutableShortListcollectShort(T[] objectArray, ShortFunction<? super T> shortFunction)static <T, R extends MutableShortCollection>
RcollectShort(T[] objectArray, ShortFunction<? super T> shortFunction, R target)static <T, P, V> MutableList<V>collectWith(T[] objectArray, Function2<? super T,? super P,? extends V> function, P parameter)static <T, P, V, R extends Collection<V>>
RcollectWith(T[] objectArray, Function2<? super T,? super P,? extends V> function, P parameter, R targetCollection)static booleancontains(double[] doubleArray, double value)Returnstrueif the specified double array contains the specified double element.static booleancontains(int[] intArray, int value)Returnstrueif the specified int array contains the specified int element.static booleancontains(long[] longArray, long value)Returnstrueif the specified long array contains the specified long element.static <T> booleancontains(T[] objectArray, T value)Returnstrueif the specified array contains the specified element.static <T> intcount(T[] objectArray, Predicate<? super T> predicate)static <T, P> intcountWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static <T> Tdetect(T[] objectArray, Predicate<? super T> predicate)static <T> TdetectIfNone(T[] objectArray, Predicate<? super T> predicate, T ifNone)static <T> intdetectIndex(T[] objectArray, Predicate<? super T> predicate)Returns the first index where the predicate evaluates totrue.static <T, IV> intdetectIndexWith(T[] objectArray, Predicate2<? super T,? super IV> predicate, IV injectedValue)Searches for the first index where the predicate evaluates totrue.static <T> intdetectLastIndex(T[] objectArray, Predicate<? super T> predicate)Returns the last index where the predicate evaluates totrue.static <T> Optional<T>detectOptional(T[] objectArray, Predicate<? super T> predicate)static <T, P> TdetectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static <T, P> TdetectWithIfNone(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, T ifNone)static <T, P> Optional<T>detectWithOptional(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static <T> MutableList<T>distinct(T[] objectArray)static <T> MutableList<T>distinct(T[] objectArray, HashingStrategy<? super T> hashingStrategy)static <T, R extends List<T>>
Rdistinct(T[] objectArray, R targetList)Deprecated.in 7.0.static <T> MutableList<T>drop(T[] array, int count)static <T, R extends Collection<T>>
Rdrop(T[] array, int count, R target)static <T, V> MutableList<V>flatCollect(T[] objectArray, Function<? super T,? extends Iterable<V>> function)static <T, V, R extends Collection<V>>
RflatCollect(T[] objectArray, Function<? super T,? extends Iterable<V>> function, R targetCollection)static <T> voidforEach(T[] objectArray, int from, int to, Procedure<? super T> procedure)Iterates over the section of the list covered by the specified inclusive indexes.static <T> voidforEach(T[] objectArray, Procedure<? super T> procedure)static <T1, T2> voidforEachInBoth(T1[] objectArray1, T2[] objectArray2, Procedure2<? super T1,? super T2> procedure)static <T, P> voidforEachWith(T[] objectArray, Procedure2<? super T,? super P> procedure, P parameter)static <T> voidforEachWithIndex(T[] objectArray, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)Iterates over the section of the list covered by the specified inclusive indexes.static <T> voidforEachWithIndex(T[] objectArray, ObjectIntProcedure<? super T> objectIntProcedure)static <T> TgetFirst(T[] objectArray)Returns the first element of an array.static <T> TgetLast(T[] objectArray)Returns the last element of an Array.static <T, V> FastListMultimap<V,T>groupBy(T[] array, Function<? super T,? extends V> function)static <T, V, R extends MutableMultimap<V, T>>
RgroupBy(T[] array, Function<? super T,? extends V> function, R target)static <T, V> FastListMultimap<V,T>groupByEach(T[] array, Function<? super T,? extends Iterable<V>> function)static <T, V, R extends MutableMultimap<V, T>>
RgroupByEach(T[] array, Function<? super T,? extends Iterable<V>> function, R target)static <T, V> MutableMapIterable<V,T>groupByUniqueKey(T[] array, Function<? super T,? extends V> function)static <T, V, R extends MutableMapIterable<V, T>>
RgroupByUniqueKey(T[] array, Function<? super T,? extends V> function, R target)static <T> intindexOf(T[] objectArray, T elem)Searches for the first occurrence of the given argument, testing for equality using theequalsmethod.static <T> doubleinjectInto(double injectValue, T[] objectArray, DoubleObjectToDoubleFunction<? super T> function)static <T> floatinjectInto(float injectValue, T[] objectArray, FloatObjectToFloatFunction<? super T> function)static <T> intinjectInto(int injectValue, T[] objectArray, IntObjectToIntFunction<? super T> function)static <T> longinjectInto(long injectValue, T[] objectArray, LongObjectToLongFunction<? super T> function)static <T, IV> IVinjectInto(IV injectValue, T[] objectArray, Function2<? super IV,? super T,? extends IV> function)static <T, IV, P> IVinjectIntoWith(IV injectValue, T[] objectArray, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)static booleanisEmpty(Object[] array)A null safe form of isEmpty.static <T> StringmakeString(T... array)static <T> StringmakeString(T[] array, String separator)static <T> StringmakeString(T[] array, String start, String separator, String end)static <T> Tmax(T... array)static <T> Tmax(T[] array, Comparator<? super T> comparator)static <T, V extends Comparable<? super V>>
TmaxBy(T[] array, Function<? super T,? extends V> function)static <T> Tmin(T... array)static <T> Tmin(T[] array, Comparator<? super T> comparator)static <T, V extends Comparable<? super V>>
TminBy(T[] array, Function<? super T,? extends V> function)static <T> booleannoneSatisfy(T[] objectArray, Predicate<? super T> predicate)static <T, P> booleannoneSatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)static booleannotEmpty(Object[] array)A null safe form of notEmpty.static <T> PartitionFastList<T>partition(T[] array, Predicate<? super T> predicate)static <T, P> PartitionFastList<T>partitionWith(T[] array, Predicate2<? super T,? super P> predicate, P parameter)static <T> MutableList<T>reject(T[] objectArray, Predicate<? super T> predicate)static <T, R extends Collection<T>>
Rreject(T[] objectArray, Predicate<? super T> predicate, R targetCollection)static <T, P, R extends Collection<T>>
RrejectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)static <T, P> MutableList<T>rejectWith(T[] objectArray, Predicate2<? super T,P> predicate, P parameter)static <T> voidreverse(T[] array, int size)static <T> MutableList<T>select(T[] objectArray, Predicate<? super T> predicate)static <T, R extends Collection<T>>
Rselect(T[] objectArray, Predicate<? super T> predicate, R targetCollection)static <T, P> Twin<MutableList<T>>selectAndRejectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)Deprecated.since 6.0 useRichIterable.partitionWith(Predicate2, Object)instead.static <T> FastList<T>selectInstancesOf(Object[] objectArray, Class<T> clazz)static <T, P, R extends Collection<T>>
RselectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)static <T, P> MutableList<T>selectWith(T[] objectArray, Predicate2<? super T,P> predicate, P parameter)static intsize(Object[] array)Return the size of the array.static <T> voidsort(T[] array, int size, Comparator<? super T> comparator)Deprecated.in 7.0.static <V, T> MutableMap<V,BigDecimal>sumByBigDecimal(T[] array, Function<? super T,? extends V> groupBy, Function<? super T,BigDecimal> function)static <V, T> MutableMap<V,BigInteger>sumByBigInteger(T[] array, Function<? super T,? extends V> groupBy, Function<? super T,BigInteger> function)static <V, T> ObjectDoubleMap<V>sumByDouble(T[] array, Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)static <V, T> ObjectDoubleMap<V>sumByFloat(T[] array, Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)static <V, T> ObjectLongMap<V>sumByInt(T[] array, Function<? super T,? extends V> groupBy, IntFunction<? super T> function)static <V, T> ObjectLongMap<V>sumByLong(T[] array, Function<? super T,? extends V> groupBy, LongFunction<? super T> function)static <T> BigDecimalsumOfBigDecimal(T[] array, Function<? super T,BigDecimal> function)static <T> BigIntegersumOfBigInteger(T[] array, Function<? super T,BigInteger> function)static <T> doublesumOfDouble(T[] array, DoubleFunction<? super T> function)static <T> doublesumOfFloat(T[] array, FloatFunction<? super T> function)static <T> longsumOfInt(T[] array, IntFunction<? super T> function)static <T> longsumOfLong(T[] array, LongFunction<? super T> function)static <T> MutableList<T>take(T[] array, int count)static <T, R extends Collection<T>>
Rtake(T[] array, int count, R target)static <T, K, V> MutableMap<K,V>toMap(T[] objectArray, Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)Iterate over the specified array applying the specified Functions to each element to calculate a key and value, and return the results as a Map.static <K, V> MutableMap<K,V>toMap(V[] objectArray, Function<? super V,? extends K> keyFunction)Iterate over the specified array applying the specified Function to each element to calculate a key and return the results as a HashMap.static <X, Y> MutableList<Pair<X,Y>>zip(X[] xs, Y[] ys)static <X, Y, R extends Collection<Pair<X, Y>>>
Rzip(X[] xs, Y[] ys, R targetCollection)static <T> MutableList<Pair<T,Integer>>zipWithIndex(T... array)static <T, R extends Collection<Pair<T, Integer>>>
RzipWithIndex(T[] array, R targetCollection)
-
Method Details
-
reverse
public static <T> void reverse(T[] array, int size) -
sort
Deprecated.in 7.0. UseArrays.sort(Object[], int, int)orArrays.sort(Object[], int, int, Comparator)instead.Inline calls to appropriate Arrays.sort() method which now uses TimSort by default since Java 8. -
minBy
public static <T, V extends Comparable<? super V>> T minBy(T[] array, Function<? super T,? extends V> function) -
maxBy
public static <T, V extends Comparable<? super V>> T maxBy(T[] array, Function<? super T,? extends V> function) -
min
- See Also:
Iterate.min(Iterable, Comparator)
-
max
- See Also:
Iterate.max(Iterable, Comparator)
-
min
public static <T> T min(T... array)- See Also:
Iterate.min(Iterable)
-
max
public static <T> T max(T... array)- See Also:
Iterate.max(Iterable)
-
select
- See Also:
Iterate.select(Iterable, Predicate)
-
selectWith
public static <T, P> MutableList<T> selectWith(T[] objectArray, Predicate2<? super T,P> predicate, P parameter) -
selectInstancesOf
-
count
- See Also:
Iterate.count(Iterable, Predicate)
-
countWith
public static <T, P> int countWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
selectAndRejectWith
@Deprecated public static <T, P> Twin<MutableList<T>> selectAndRejectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter)Deprecated.since 6.0 useRichIterable.partitionWith(Predicate2, Object)instead. -
partition
- See Also:
Iterate.partition(Iterable, Predicate)
-
partitionWith
public static <T, P> PartitionFastList<T> partitionWith(T[] array, Predicate2<? super T,? super P> predicate, P parameter) -
collectIf
public static <T, V> MutableList<V> collectIf(T[] objectArray, Predicate<? super T> predicate, Function<? super T,? extends V> function) -
select
public static <T, R extends Collection<T>> R select(T[] objectArray, Predicate<? super T> predicate, R targetCollection) -
selectWith
public static <T, P, R extends Collection<T>> R selectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection) -
collectIf
public static <T, V, R extends Collection<V>> R collectIf(T[] objectArray, Predicate<? super T> predicate, Function<? super T,? extends V> function, R targetCollection) -
reject
- See Also:
Iterate.reject(Iterable, Predicate)
-
rejectWith
public static <T, P> MutableList<T> rejectWith(T[] objectArray, Predicate2<? super T,P> predicate, P parameter) -
reject
public static <T, R extends Collection<T>> R reject(T[] objectArray, Predicate<? super T> predicate, R targetCollection) -
rejectWith
public static <T, P, R extends Collection<T>> R rejectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection) -
addAllTo
- See Also:
Iterate.addAllTo(Iterable, Collection)
-
collect
public static <T, V> MutableList<V> collect(T[] objectArray, Function<? super T,? extends V> function)- See Also:
Iterate.collect(Iterable, Function)
-
collect
public static <T, V, R extends Collection<V>> R collect(T[] objectArray, Function<? super T,? extends V> function, R targetCollection) -
collectBoolean
public static <T> MutableBooleanList collectBoolean(T[] objectArray, BooleanFunction<? super T> booleanFunction) -
collectBoolean
public static <T, R extends MutableBooleanCollection> R collectBoolean(T[] objectArray, BooleanFunction<? super T> booleanFunction, R target) -
collectByte
public static <T> MutableByteList collectByte(T[] objectArray, ByteFunction<? super T> byteFunction) -
collectByte
public static <T, R extends MutableByteCollection> R collectByte(T[] objectArray, ByteFunction<? super T> byteFunction, R target) -
collectChar
public static <T> MutableCharList collectChar(T[] objectArray, CharFunction<? super T> charFunction) -
collectChar
public static <T, R extends MutableCharCollection> R collectChar(T[] objectArray, CharFunction<? super T> charFunction, R target) -
collectDouble
public static <T> MutableDoubleList collectDouble(T[] objectArray, DoubleFunction<? super T> doubleFunction) -
collectDouble
public static <T, R extends MutableDoubleCollection> R collectDouble(T[] objectArray, DoubleFunction<? super T> doubleFunction, R target) -
collectFloat
public static <T> MutableFloatList collectFloat(T[] objectArray, FloatFunction<? super T> floatFunction) -
collectFloat
public static <T, R extends MutableFloatCollection> R collectFloat(T[] objectArray, FloatFunction<? super T> floatFunction, R target) -
collectInt
-
collectInt
public static <T, R extends MutableIntCollection> R collectInt(T[] objectArray, IntFunction<? super T> intFunction, R target) -
collectLong
public static <T> MutableLongList collectLong(T[] objectArray, LongFunction<? super T> longFunction) -
collectLong
public static <T, R extends MutableLongCollection> R collectLong(T[] objectArray, LongFunction<? super T> longFunction, R target) -
collectShort
public static <T> MutableShortList collectShort(T[] objectArray, ShortFunction<? super T> shortFunction) -
collectShort
public static <T, R extends MutableShortCollection> R collectShort(T[] objectArray, ShortFunction<? super T> shortFunction, R target) -
flatCollect
public static <T, V> MutableList<V> flatCollect(T[] objectArray, Function<? super T,? extends Iterable<V>> function)- See Also:
Iterate.flatCollect(Iterable, Function)
-
flatCollect
public static <T, V, R extends Collection<V>> R flatCollect(T[] objectArray, Function<? super T,? extends Iterable<V>> function, R targetCollection) -
getFirst
public static <T> T getFirst(T[] objectArray)Returns the first element of an array. This method is null safe. -
getLast
public static <T> T getLast(T[] objectArray)Returns the last element of an Array. This method is null safe. -
forEach
- See Also:
Iterate.forEach(Iterable, Procedure)
-
forEach
Iterates over the section of the list covered by the specified inclusive indexes. The indexes are both inclusive. -
forEachInBoth
public static <T1, T2> void forEachInBoth(T1[] objectArray1, T2[] objectArray2, Procedure2<? super T1,? super T2> procedure) -
forEachWithIndex
public static <T> void forEachWithIndex(T[] objectArray, ObjectIntProcedure<? super T> objectIntProcedure) -
forEachWithIndex
public static <T> void forEachWithIndex(T[] objectArray, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)Iterates over the section of the list covered by the specified inclusive indexes. The indexes are both inclusive. -
detect
- See Also:
Iterate.detect(Iterable, Predicate)
-
detectWith
public static <T, P> T detectWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
detectOptional
-
detectWithOptional
public static <T, P> Optional<T> detectWithOptional(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
detectIfNone
-
detectWithIfNone
public static <T, P> T detectWithIfNone(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter, T ifNone) -
injectInto
public static <T, IV> IV injectInto(IV injectValue, T[] objectArray, Function2<? super IV,? super T,? extends IV> function) -
injectInto
public static <T> int injectInto(int injectValue, T[] objectArray, IntObjectToIntFunction<? super T> function) -
injectInto
public static <T> long injectInto(long injectValue, T[] objectArray, LongObjectToLongFunction<? super T> function) -
injectInto
public static <T> float injectInto(float injectValue, T[] objectArray, FloatObjectToFloatFunction<? super T> function)- Since:
- 6.0
- See Also:
Iterate.injectInto(float, Iterable, FloatObjectToFloatFunction)
-
injectInto
public static <T> double injectInto(double injectValue, T[] objectArray, DoubleObjectToDoubleFunction<? super T> function) -
distinct
Deprecated.in 7.0. -
distinct
- Since:
- 7.0.
-
distinct
public static <T> MutableList<T> distinct(T[] objectArray, HashingStrategy<? super T> hashingStrategy)- Since:
- 7.0.
-
contains
public static <T> boolean contains(T[] objectArray, T value)Returnstrueif the specified array contains the specified element. -
contains
public static boolean contains(int[] intArray, int value)Returnstrueif the specified int array contains the specified int element. -
contains
public static boolean contains(double[] doubleArray, double value)Returnstrueif the specified double array contains the specified double element. -
contains
public static boolean contains(long[] longArray, long value)Returnstrueif the specified long array contains the specified long element. -
indexOf
public static <T> int indexOf(T[] objectArray, T elem)Searches for the first occurrence of the given argument, testing for equality using theequalsmethod. -
detectIndex
Returns the first index where the predicate evaluates totrue. Returns -1 for no matches. -
detectIndexWith
public static <T, IV> int detectIndexWith(T[] objectArray, Predicate2<? super T,? super IV> predicate, IV injectedValue)Searches for the first index where the predicate evaluates totrue. Returns -1 for no matches. -
detectLastIndex
Returns the last index where the predicate evaluates totrue. Returns -1 for no matches. -
isEmpty
A null safe form of isEmpty. Null or length of zero returnstrue. -
notEmpty
A null safe form of notEmpty. The opposite of isEmpty is returned. -
size
Return the size of the array. -
anySatisfy
- See Also:
Iterate.anySatisfy(Iterable, Predicate)
-
anySatisfyWith
public static <T, P> boolean anySatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
allSatisfy
- See Also:
Iterate.allSatisfy(Iterable, Predicate)
-
allSatisfyWith
public static <T, P> boolean allSatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
noneSatisfy
- See Also:
Iterate.noneSatisfy(Iterable, Predicate)
-
noneSatisfyWith
public static <T, P> boolean noneSatisfyWith(T[] objectArray, Predicate2<? super T,? super P> predicate, P parameter) -
toMap
public static <K, V> MutableMap<K,V> toMap(V[] objectArray, Function<? super V,? extends K> keyFunction)Iterate over the specified array applying the specified Function to each element to calculate a key and return the results as a HashMap. -
toMap
public static <T, K, V> MutableMap<K,V> toMap(T[] objectArray, Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)Iterate over the specified array applying the specified Functions to each element to calculate a key and value, and return the results as a Map. -
forEachWith
public static <T, P> void forEachWith(T[] objectArray, Procedure2<? super T,? super P> procedure, P parameter) -
collectWith
public static <T, P, V> MutableList<V> collectWith(T[] objectArray, Function2<? super T,? super P,? extends V> function, P parameter) -
collectWith
public static <T, P, V, R extends Collection<V>> R collectWith(T[] objectArray, Function2<? super T,? super P,? extends V> function, P parameter, R targetCollection) -
injectIntoWith
public static <T, IV, P> IV injectIntoWith(IV injectValue, T[] objectArray, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter) -
take
- See Also:
Iterate.take(Iterable, int)
-
take
- See Also:
Iterate.take(Iterable, int)
-
drop
- See Also:
Iterate.drop(Iterable, int)
-
drop
- See Also:
Iterate.drop(Iterable, int)
-
groupBy
public static <T, V> FastListMultimap<V,T> groupBy(T[] array, Function<? super T,? extends V> function)- See Also:
Iterate.groupBy(Iterable, Function)
-
groupBy
public static <T, V, R extends MutableMultimap<V, T>> R groupBy(T[] array, Function<? super T,? extends V> function, R target) -
groupByEach
public static <T, V> FastListMultimap<V,T> groupByEach(T[] array, 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(T[] array, Function<? super T,? extends Iterable<V>> function, R target) -
groupByUniqueKey
public static <T, V> MutableMapIterable<V,T> groupByUniqueKey(T[] array, Function<? super T,? extends V> function) -
groupByUniqueKey
public static <T, V, R extends MutableMapIterable<V, T>> R groupByUniqueKey(T[] array, Function<? super T,? extends V> function, R target) -
chunk
- See Also:
Iterate.chunk(Iterable, int)
-
zip
- See Also:
Iterate.zip(Iterable, Iterable)
-
zip
public static <X, Y, R extends Collection<Pair<X, Y>>> R zip(X[] xs, Y[] ys, R targetCollection) -
zipWithIndex
- See Also:
Iterate.zipWithIndex(Iterable)
-
zipWithIndex
public static <T, R extends Collection<Pair<T, Integer>>> R zipWithIndex(T[] array, R targetCollection) -
makeString
- See Also:
Iterate.makeString(Iterable)
-
makeString
- See Also:
Iterate.makeString(Iterable, String)
-
makeString
-
appendString
-
appendString
-
appendString
public static <T> void appendString(T[] array, Appendable appendable, String start, String separator, String end) -
sumOfInt
- Since:
- 6.0
- See Also:
Iterate.sumOfInt(Iterable, IntFunction)
-
sumOfLong
- Since:
- 6.0
- See Also:
Iterate.sumOfLong(Iterable, LongFunction)
-
sumOfFloat
- Since:
- 6.0
- See Also:
Iterate.sumOfFloat(Iterable, FloatFunction)
-
sumOfDouble
- Since:
- 6.0
- See Also:
Iterate.sumOfDouble(Iterable, DoubleFunction)
-
sumOfBigDecimal
- Since:
- 6.0
- See Also:
Iterate.sumOfBigDecimal(Iterable, Function)
-
sumOfBigInteger
- Since:
- 6.0
- See Also:
Iterate.sumOfBigInteger(Iterable, Function)
-
sumByBigDecimal
public static <V, T> MutableMap<V,BigDecimal> sumByBigDecimal(T[] array, Function<? super T,? extends V> groupBy, Function<? super T,BigDecimal> function)- Since:
- 6.0
- See Also:
Iterate.sumByBigDecimal(Iterable, Function, Function)
-
sumByBigInteger
public static <V, T> MutableMap<V,BigInteger> sumByBigInteger(T[] array, Function<? super T,? extends V> groupBy, Function<? super T,BigInteger> function)- Since:
- 6.0
- See Also:
Iterate.sumByBigInteger(Iterable, Function, Function)
-
sumByInt
public static <V, T> ObjectLongMap<V> sumByInt(T[] array, Function<? super T,? extends V> groupBy, IntFunction<? super T> function)- Since:
- 6.0
- See Also:
Iterate.sumByInt(Iterable, Function, IntFunction)
-
sumByLong
public static <V, T> ObjectLongMap<V> sumByLong(T[] array, Function<? super T,? extends V> groupBy, LongFunction<? super T> function)- Since:
- 6.0
- See Also:
Iterate.sumByLong(Iterable, Function, LongFunction)
-
sumByFloat
public static <V, T> ObjectDoubleMap<V> sumByFloat(T[] array, Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)- Since:
- 6.0
- See Also:
Iterate.sumByFloat(Iterable, Function, FloatFunction)
-
sumByDouble
public static <V, T> ObjectDoubleMap<V> sumByDouble(T[] array, Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)- Since:
- 6.0
- See Also:
Iterate.sumByDouble(Iterable, Function, DoubleFunction)
-