public final class ArrayIterate
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T,R extends java.util.Collection<T>> |
addAllTo(T[] objectArray,
R targetCollection) |
static <T> boolean |
allSatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> boolean |
allSatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> boolean |
anySatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> boolean |
anySatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> void |
appendString(T[] array,
java.lang.Appendable appendable) |
static <T> void |
appendString(T[] array,
java.lang.Appendable appendable,
java.lang.String separator) |
static <T> void |
appendString(T[] array,
java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
static <T> com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> |
chunk(T[] array,
int size) |
static <T,V> com.gs.collections.api.list.MutableList<V> |
collect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V,R extends java.util.Collection<V>> |
collect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R targetCollection) |
static <T> com.gs.collections.api.list.primitive.MutableBooleanList |
collectBoolean(T[] objectArray,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableBooleanCollection> |
collectBoolean(T[] objectArray,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableByteList |
collectByte(T[] objectArray,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableByteCollection> |
collectByte(T[] objectArray,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableCharList |
collectChar(T[] objectArray,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableCharCollection> |
collectChar(T[] objectArray,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableDoubleList |
collectDouble(T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableDoubleCollection> |
collectDouble(T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableFloatList |
collectFloat(T[] objectArray,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableFloatCollection> |
collectFloat(T[] objectArray,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction,
R target) |
static <T,V> com.gs.collections.api.list.MutableList<V> |
collectIf(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V,R extends java.util.Collection<V>> |
collectIf(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R targetCollection) |
static <T> com.gs.collections.api.list.primitive.MutableIntList |
collectInt(T[] objectArray,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableIntCollection> |
collectInt(T[] objectArray,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableLongList |
collectLong(T[] objectArray,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableLongCollection> |
collectLong(T[] objectArray,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction,
R target) |
static <T> com.gs.collections.api.list.primitive.MutableShortList |
collectShort(T[] objectArray,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction) |
static <T,R extends com.gs.collections.api.collection.primitive.MutableShortCollection> |
collectShort(T[] objectArray,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction,
R target) |
static <T,P,V> com.gs.collections.api.list.MutableList<V> |
collectWith(T[] objectArray,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends V> function,
P parameter) |
static <T,P,V,R extends java.util.Collection<V>> |
collectWith(T[] objectArray,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends V> function,
P parameter,
R targetCollection) |
static boolean |
contains(double[] doubleArray,
double value)
Returns true if the specified double array contains the specified double element.
|
static boolean |
contains(int[] intArray,
int value)
Returns true if the specified int array contains the specified int element.
|
static boolean |
contains(long[] longArray,
long value)
Returns true if the specified long array contains the specified long element.
|
static <T> boolean |
contains(T[] objectArray,
T value)
Returns true if the specified array contains the specified element.
|
static <T> int |
count(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,P> int |
countWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> T |
detect(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> T |
detectIfNone(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
T ifNone) |
static <T> int |
detectIndex(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Returns the first index where the predicate evaluates to true.
|
static <T,IV> int |
detectIndexWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,IV> predicate,
IV injectedValue)
Searches for the first index where the predicate evaluates to true.
|
static <T,P> T |
detectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
static <T,P> T |
detectWithIfNone(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter,
T ifNone) |
static <T,R extends java.util.Collection<T>> |
distinct(T[] objectArray,
R targetCollection) |
static <T> com.gs.collections.api.list.MutableList<T> |
drop(T[] array,
int count) |
static <T,R extends java.util.Collection<T>> |
drop(T[] array,
int count,
R target) |
static <T,V> com.gs.collections.api.list.MutableList<V> |
flatCollect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function) |
static <T,V,R extends java.util.Collection<V>> |
flatCollect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R targetCollection) |
static <T> void |
forEach(T[] objectArray,
int from,
int to,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
Iterates over the section of the list covered by the specified inclusive indexes.
|
static <T> void |
forEach(T[] objectArray,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
static <T1,T2> void |
forEachInBoth(T1[] objectArray1,
T2[] objectArray2,
com.gs.collections.api.block.procedure.Procedure2<T1,T2> procedure) |
static <T,P> void |
forEachWith(T[] objectArray,
com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter) |
static <T> void |
forEachWithIndex(T[] objectArray,
int from,
int to,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the section of the list covered by the specified inclusive indexes.
|
static <T> void |
forEachWithIndex(T[] objectArray,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
static <T> T |
getFirst(T[] objectArray)
Returns the first element of an array.
|
static <T> T |
getLast(T[] objectArray)
Returns the last element of an Array.
|
static <T,V> FastListMultimap<V,T> |
groupBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> |
groupBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R target) |
static <T,V> FastListMultimap<V,T> |
groupByEach(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function) |
static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> |
groupByEach(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R target) |
static <T> int |
indexOf(T[] objectArray,
T elem)
Searches for the first occurrence of the given argument, testing
for equality using the equals method.
|
static <T> double |
injectInto(double injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleObjectToDoubleFunction<? super T> function) |
static <T> int |
injectInto(int injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.IntObjectToIntFunction<? super T> function) |
static <T,IV> IV |
injectInto(IV injectValue,
T[] objectArray,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function) |
static <T> long |
injectInto(long injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.LongObjectToLongFunction<? super T> function) |
static <T,IV,P> IV |
injectIntoWith(IV injectValue,
T[] objectArray,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
static boolean |
isEmpty(java.lang.Object[] array)
A null safe form of isEmpty.
|
static <T> java.lang.String |
makeString(T... array) |
static <T> java.lang.String |
makeString(T[] array,
java.lang.String separator) |
static <T> java.lang.String |
makeString(T[] array,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
static <T> T |
max(T... array) |
static <T> T |
max(T[] array,
java.util.Comparator<? super T> comparator) |
static <T,V extends java.lang.Comparable<? super V>> |
maxBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V extends java.lang.Comparable<? super V>> |
maxBy(T[] array,
int size,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T> T |
min(T... array) |
static <T> T |
min(T[] array,
java.util.Comparator<? super T> comparator) |
static <T,V extends java.lang.Comparable<? super V>> |
minBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V extends java.lang.Comparable<? super V>> |
minBy(T[] array,
int size,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T> boolean |
noneSatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> boolean |
noneSatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static boolean |
notEmpty(java.lang.Object[] array)
A null safe form of notEmpty.
|
static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> |
partition(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> com.gs.collections.api.list.MutableList<T> |
reject(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,R extends java.util.Collection<T>> |
reject(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection) |
static <T,P,R extends java.util.Collection<T>> |
rejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T,P> com.gs.collections.api.list.MutableList<T> |
rejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter) |
static <T> void |
reverse(T[] array,
int size) |
static <T> com.gs.collections.api.list.MutableList<T> |
select(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,R extends java.util.Collection<T>> |
select(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection) |
static <T,P> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> |
selectAndRejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> com.gs.collections.api.list.MutableList<T> |
selectInstancesOf(java.lang.Object[] objectArray,
java.lang.Class<T> clazz) |
static <T,P,R extends java.util.Collection<T>> |
selectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T,P> com.gs.collections.api.list.MutableList<T> |
selectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter) |
static int |
size(java.lang.Object[] array)
Return the size of the array.
|
static <T> void |
sort(T[] array,
int size,
java.util.Comparator<? super T> comparator) |
static <T> com.gs.collections.api.list.MutableList<T> |
take(T[] array,
int count) |
static <T,R extends java.util.Collection<T>> |
take(T[] array,
int count,
R target) |
static <T,K,V> com.gs.collections.api.map.MutableMap<K,V> |
toMap(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends K> keyFunction,
com.gs.collections.api.block.function.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> com.gs.collections.api.map.MutableMap<K,V> |
toMap(V[] objectArray,
com.gs.collections.api.block.function.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> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<X,Y>> |
zip(X[] xs,
Y[] ys) |
static <X,Y,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<X,Y>>> |
zip(X[] xs,
Y[] ys,
R targetCollection) |
static <T> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>> |
zipWithIndex(T... array) |
static <T,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>>> |
zipWithIndex(T[] array,
R targetCollection) |
public static <T> void reverse(T[] array,
int size)
public static <T> void sort(T[] array,
int size,
java.util.Comparator<? super T> comparator)
public static <T,V extends java.lang.Comparable<? super V>> T minBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V extends java.lang.Comparable<? super V>> T minBy(T[] array,
int size,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V extends java.lang.Comparable<? super V>> T maxBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V extends java.lang.Comparable<? super V>> T maxBy(T[] array,
int size,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T> T min(T[] array,
java.util.Comparator<? super T> comparator)
Iterate.min(Iterable, Comparator)public static <T> T max(T[] array,
java.util.Comparator<? super T> comparator)
Iterate.max(Iterable, Comparator)public static <T> T min(T... array)
Iterate.min(Iterable)public static <T> T max(T... array)
Iterate.max(Iterable)public static <T> com.gs.collections.api.list.MutableList<T> select(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.select(Iterable, Predicate)public static <T,P> com.gs.collections.api.list.MutableList<T> selectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter)
public static <T> com.gs.collections.api.list.MutableList<T> selectInstancesOf(java.lang.Object[] objectArray,
java.lang.Class<T> clazz)
public static <T> int count(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.count(Iterable, Predicate)public static <T,P> int countWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
public static <T,P> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> selectAndRejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
public static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> partition(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,V> com.gs.collections.api.list.MutableList<V> collectIf(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,R extends java.util.Collection<T>> R select(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection)
public static <T,P,R extends java.util.Collection<T>> R selectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection)
public static <T,V,R extends java.util.Collection<V>> R collectIf(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R targetCollection)
public static <T> com.gs.collections.api.list.MutableList<T> reject(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.reject(Iterable, Predicate)public static <T,P> com.gs.collections.api.list.MutableList<T> rejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter)
public static <T,R extends java.util.Collection<T>> R reject(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection)
public static <T,P,R extends java.util.Collection<T>> R rejectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection)
public static <T,R extends java.util.Collection<T>> R addAllTo(T[] objectArray,
R targetCollection)
public static <T,V> com.gs.collections.api.list.MutableList<V> collect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
Iterate.collect(Iterable, Function)public static <T,V,R extends java.util.Collection<V>> R collect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R targetCollection)
public static <T> com.gs.collections.api.list.primitive.MutableBooleanList collectBoolean(T[] objectArray,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableBooleanCollection> R collectBoolean(T[] objectArray,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableByteList collectByte(T[] objectArray,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableByteCollection> R collectByte(T[] objectArray,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableCharList collectChar(T[] objectArray,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableCharCollection> R collectChar(T[] objectArray,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableDoubleList collectDouble(T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableDoubleCollection> R collectDouble(T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableFloatList collectFloat(T[] objectArray,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableFloatCollection> R collectFloat(T[] objectArray,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableIntList collectInt(T[] objectArray,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableIntCollection> R collectInt(T[] objectArray,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableLongList collectLong(T[] objectArray,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableLongCollection> R collectLong(T[] objectArray,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction,
R target)
public static <T> com.gs.collections.api.list.primitive.MutableShortList collectShort(T[] objectArray,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction)
public static <T,R extends com.gs.collections.api.collection.primitive.MutableShortCollection> R collectShort(T[] objectArray,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction,
R target)
public static <T,V> com.gs.collections.api.list.MutableList<V> flatCollect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function)
public static <T,V,R extends java.util.Collection<V>> R flatCollect(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R targetCollection)
public static <T> T getFirst(T[] objectArray)
public static <T> T getLast(T[] objectArray)
public static <T> void forEach(T[] objectArray,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
Iterate.forEach(Iterable, Procedure)public static <T> void forEach(T[] objectArray,
int from,
int to,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
public static <T1,T2> void forEachInBoth(T1[] objectArray1,
T2[] objectArray2,
com.gs.collections.api.block.procedure.Procedure2<T1,T2> procedure)
public static <T> void forEachWithIndex(T[] objectArray,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
public static <T> void forEachWithIndex(T[] objectArray,
int from,
int to,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
public static <T> T detect(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.detect(Iterable, Predicate)public static <T,P> T detectWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
public static <T> T detectIfNone(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
T ifNone)
public static <T,P> T detectWithIfNone(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,P> predicate,
P parameter,
T ifNone)
public static <T,IV> IV injectInto(IV injectValue,
T[] objectArray,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function)
public static <T> int injectInto(int injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.IntObjectToIntFunction<? super T> function)
public static <T> long injectInto(long injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.LongObjectToLongFunction<? super T> function)
public static <T> double injectInto(double injectValue,
T[] objectArray,
com.gs.collections.api.block.function.primitive.DoubleObjectToDoubleFunction<? super T> function)
public static <T,R extends java.util.Collection<T>> R distinct(T[] objectArray,
R targetCollection)
public static <T> boolean contains(T[] objectArray,
T value)
public static boolean contains(int[] intArray,
int value)
public static boolean contains(double[] doubleArray,
double value)
public static boolean contains(long[] longArray,
long value)
public static <T> int indexOf(T[] objectArray,
T elem)
public static <T> int detectIndex(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> int detectIndexWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,IV> predicate,
IV injectedValue)
public static boolean isEmpty(java.lang.Object[] array)
public static boolean notEmpty(java.lang.Object[] array)
public static int size(java.lang.Object[] array)
public static <T> boolean anySatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> boolean anySatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> boolean allSatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> boolean allSatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> boolean noneSatisfy(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> boolean noneSatisfyWith(T[] objectArray,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <K,V> com.gs.collections.api.map.MutableMap<K,V> toMap(V[] objectArray,
com.gs.collections.api.block.function.Function<? super V,? extends K> keyFunction)
public static <T,K,V> com.gs.collections.api.map.MutableMap<K,V> toMap(T[] objectArray,
com.gs.collections.api.block.function.Function<? super T,? extends K> keyFunction,
com.gs.collections.api.block.function.Function<? super T,? extends V> valueFunction)
public static <T,P> void forEachWith(T[] objectArray,
com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter)
public static <T,P,V> com.gs.collections.api.list.MutableList<V> collectWith(T[] objectArray,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends V> function,
P parameter)
public static <T,P,V,R extends java.util.Collection<V>> R collectWith(T[] objectArray,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends V> function,
P parameter,
R targetCollection)
public static <T,IV,P> IV injectIntoWith(IV injectValue,
T[] objectArray,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter)
public static <T> com.gs.collections.api.list.MutableList<T> take(T[] array,
int count)
Iterate.take(Iterable, int)public static <T,R extends java.util.Collection<T>> R take(T[] array,
int count,
R target)
Iterate.take(Iterable, int)public static <T> com.gs.collections.api.list.MutableList<T> drop(T[] array,
int count)
Iterate.drop(Iterable, int)public static <T,R extends java.util.Collection<T>> R drop(T[] array,
int count,
R target)
Iterate.drop(Iterable, int)public static <T,V> FastListMultimap<V,T> groupBy(T[] array, com.gs.collections.api.block.function.Function<? super T,? extends V> function)
Iterate.groupBy(Iterable, Function)public static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> R groupBy(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R target)
public static <T,V> FastListMultimap<V,T> groupByEach(T[] array, com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function)
public static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> R groupByEach(T[] array,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R target)
public static <T> com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> chunk(T[] array,
int size)
Iterate.chunk(Iterable, int)public static <X,Y> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<X,Y>> zip(X[] xs,
Y[] ys)
Iterate.zip(Iterable, Iterable)public static <X,Y,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<X,Y>>> R zip(X[] xs,
Y[] ys,
R targetCollection)
public static <T> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>> zipWithIndex(T... array)
Iterate.zipWithIndex(Iterable)public static <T,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>>> R zipWithIndex(T[] array,
R targetCollection)
public static <T> java.lang.String makeString(T... array)
Iterate.makeString(Iterable)public static <T> java.lang.String makeString(T[] array,
java.lang.String separator)
Iterate.makeString(Iterable, String)public static <T> java.lang.String makeString(T[] array,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
public static <T> void appendString(T[] array,
java.lang.Appendable appendable)
public static <T> void appendString(T[] array,
java.lang.Appendable appendable,
java.lang.String separator)
public static <T> void appendString(T[] array,
java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)