Class ArrayListIterate
- java.lang.Object
-
- org.eclipse.collections.impl.utility.ArrayListIterate
-
public final class ArrayListIterate extends Object
This utility class provides optimized iteration pattern implementations that work with java.util.ArrayList.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T,K,V>
MutableMap<K,V>aggregateBy(ArrayList<T> list, 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(ArrayList<T> list, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)static <T> booleanallSatisfy(ArrayList<T> list, Predicate<? super T> predicate)static <T,IV>
booleanallSatisfyWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)static <T> booleananySatisfy(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
booleananySatisfyWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T,A>
ArrayList<A>collect(ArrayList<T> list, Function<? super T,? extends A> function)static <T,A,R extends Collection<A>>
Rcollect(ArrayList<T> list, Function<? super T,? extends A> function, R targetCollection)static <T> MutableBooleanListcollectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction)static <T,R extends MutableBooleanCollection>
RcollectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction, R target)static <T> MutableByteListcollectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction)static <T,R extends MutableByteCollection>
RcollectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction, R target)static <T> MutableCharListcollectChar(ArrayList<T> list, CharFunction<? super T> charFunction)static <T,R extends MutableCharCollection>
RcollectChar(ArrayList<T> list, CharFunction<? super T> charFunction, R target)static <T> MutableDoubleListcollectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction)static <T,R extends MutableDoubleCollection>
RcollectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction, R target)static <T> MutableFloatListcollectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction)static <T,R extends MutableFloatCollection>
RcollectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction, R target)static <T,A>
ArrayList<A>collectIf(ArrayList<T> list, Predicate<? super T> predicate, Function<? super T,? extends A> function)static <T,A,R extends Collection<A>>
RcollectIf(ArrayList<T> list, Predicate<? super T> predicate, Function<? super T,? extends A> function, R targetCollection)static <T> MutableIntListcollectInt(ArrayList<T> list, IntFunction<? super T> intFunction)static <T,R extends MutableIntCollection>
RcollectInt(ArrayList<T> list, IntFunction<? super T> intFunction, R target)static <T> MutableLongListcollectLong(ArrayList<T> list, LongFunction<? super T> longFunction)static <T,R extends MutableLongCollection>
RcollectLong(ArrayList<T> list, LongFunction<? super T> longFunction, R target)static <T> MutableShortListcollectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction)static <T,R extends MutableShortCollection>
RcollectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction, R target)static <T,P,A>
ArrayList<A>collectWith(ArrayList<T> list, Function2<? super T,? super P,? extends A> function, P parameter)static <T,P,A,R extends Collection<A>>
RcollectWith(ArrayList<T> list, Function2<? super T,? super P,? extends A> function, P parameter, R targetCollection)static <T> intcount(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
intcountWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> Tdetect(ArrayList<T> list, Predicate<? super T> predicate)static <T> TdetectIfNone(ArrayList<T> list, Predicate<? super T> predicate, T ifNone)static <T> intdetectIndex(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
intdetectIndexWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> intdetectLastIndex(ArrayList<T> list, Predicate<? super T> predicate)static <T> Optional<T>detectOptional(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
TdetectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T,IV>
TdetectWithIfNone(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue, T ifNone)static <T,P>
Optional<T>detectWithOptional(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> ArrayList<T>distinct(ArrayList<T> list)static <T> ArrayList<T>distinct(ArrayList<T> list, HashingStrategy<? super T> hashingStrategy)static <T,R extends List<T>>
Rdistinct(ArrayList<T> list, R targetList)Deprecated.in 7.0.static <T,V>
ArrayList<T>distinctBy(ArrayList<T> list, Function<? super T,? extends V> function)static <T> ArrayList<T>drop(ArrayList<T> list, int count)static <T,R extends Collection<T>>
Rdrop(ArrayList<T> list, int count, R targetList)static <T> MutableList<T>dropWhile(ArrayList<T> list, Predicate<? super T> predicate)static <T,A>
ArrayList<A>flatCollect(ArrayList<T> list, Function<? super T,? extends Iterable<A>> function)static <T,A,R extends Collection<A>>
RflatCollect(ArrayList<T> list, Function<? super T,? extends Iterable<A>> function, R targetCollection)static <T> voidforEach(ArrayList<T> list, int from, int to, Procedure<? super T> procedure)Iterates over the section of the list covered by the specified indexes.static <T> voidforEach(ArrayList<T> list, Procedure<? super T> procedure)static <T1,T2>
voidforEachInBoth(ArrayList<T1> list1, ArrayList<T2> list2, Procedure2<? super T1,? super T2> procedure)static <T,P>
voidforEachWith(ArrayList<T> list, Procedure2<? super T,? super P> procedure, P parameter)static <T> voidforEachWithIndex(ArrayList<T> list, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)Iterates over the section of the list covered by the specified indexes.static <T> voidforEachWithIndex(ArrayList<T> list, ObjectIntProcedure<? super T> objectIntProcedure)static <T,V>
FastListMultimap<V,T>groupBy(ArrayList<T> list, Function<? super T,? extends V> function)static <T,V,R extends MutableMultimap<V,T>>
RgroupBy(ArrayList<T> list, Function<? super T,? extends V> function, R target)static <T,V>
FastListMultimap<V,T>groupByEach(ArrayList<T> list, Function<? super T,? extends Iterable<V>> function)static <T,V,R extends MutableMultimap<V,T>>
RgroupByEach(ArrayList<T> list, Function<? super T,? extends Iterable<V>> function, R target)static <T,V>
MutableMap<V,T>groupByUniqueKey(ArrayList<T> list, Function<? super T,? extends V> function)static <T,V,R extends MutableMapIterable<V,T>>
RgroupByUniqueKey(ArrayList<T> list, Function<? super T,? extends V> function, R target)static <T> doubleinjectInto(double injectValue, ArrayList<T> list, DoubleObjectToDoubleFunction<? super T> function)static <T> floatinjectInto(float injectValue, ArrayList<T> list, FloatObjectToFloatFunction<? super T> function)static <T> intinjectInto(int injectValue, ArrayList<T> list, IntObjectToIntFunction<? super T> function)static <T> longinjectInto(long injectValue, ArrayList<T> list, LongObjectToLongFunction<? super T> function)static <T,IV>
IVinjectInto(IV injectValue, ArrayList<T> list, Function2<? super IV,? super T,? extends IV> function)static <T,IV,P>
IVinjectIntoWith(IV injectedValue, ArrayList<T> list, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)static <T> booleannoneSatisfy(ArrayList<T> list, Predicate<? super T> predicate)static <T,IV>
booleannoneSatisfyWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)static <T> PartitionMutableList<T>partition(ArrayList<T> list, Predicate<? super T> predicate)static <T> PartitionMutableList<T>partitionWhile(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
PartitionMutableList<T>partitionWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> ArrayList<T>reject(ArrayList<T> list, Predicate<? super T> predicate)static <T,R extends Collection<T>>
Rreject(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection)static <T,IV>
ArrayList<T>rejectWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)static <T,P,R extends Collection<T>>
RrejectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P injectedValue, R targetCollection)static <T> booleanremoveIf(ArrayList<T> list, Predicate<? super T> predicate)static <T,P>
booleanremoveIfWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> voidreverseForEach(ArrayList<T> list, Procedure<? super T> procedure)Reverses over the List in reverse order executing the Procedure for each element.static <T> voidreverseForEachWithIndex(ArrayList<T> list, ObjectIntProcedure<? super T> procedure)Reverses over the List in reverse order executing the Procedure with index for each element.static <T> ArrayList<T>select(ArrayList<T> list, Predicate<? super T> predicate)static <T,R extends Collection<T>>
Rselect(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection)static <T,P>
Twin<MutableList<T>>selectAndRejectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)static <T> MutableList<T>selectInstancesOf(ArrayList<?> list, Class<T> clazz)static <T,IV>
ArrayList<T>selectWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)static <T,P,R extends Collection<T>>
RselectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)static <T extends Comparable<? super T>>
ArrayList<T>sortThis(ArrayList<T> list)Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList.static <T> ArrayList<T>sortThis(ArrayList<T> list, Comparator<? super T> comparator)Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList.static <T> ArrayList<T>take(ArrayList<T> list, int count)static <T,R extends Collection<T>>
Rtake(ArrayList<T> list, int count, R targetList)static <T> MutableList<T>takeWhile(ArrayList<T> list, Predicate<? super T> predicate)static <T> voidtoArray(ArrayList<T> list, T[] target, int startIndex, int sourceSize)static <X,Y>
MutableList<Pair<X,Y>>zip(ArrayList<X> xs, Iterable<Y> ys)static <X,Y,R extends Collection<Pair<X,Y>>>
Rzip(ArrayList<X> xs, Iterable<Y> ys, R targetCollection)static <T> MutableList<Pair<T,Integer>>zipWithIndex(ArrayList<T> list)static <T,R extends Collection<Pair<T,Integer>>>
RzipWithIndex(ArrayList<T> list, R targetCollection)
-
-
-
Method Detail
-
select
public static <T> ArrayList<T> select(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.select(Iterable, Predicate)
-
selectWith
public static <T,IV> ArrayList<T> selectWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
select
public static <T,R extends Collection<T>> R select(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection)
-
selectWith
public static <T,P,R extends Collection<T>> R selectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
-
selectInstancesOf
public static <T> MutableList<T> selectInstancesOf(ArrayList<?> list, Class<T> clazz)
-
count
public static <T> int count(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.count(Iterable, Predicate)
-
countWith
public static <T,P> int countWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
collectIf
public static <T,A> ArrayList<A> collectIf(ArrayList<T> list, Predicate<? super T> predicate, Function<? super T,? extends A> function)
-
collectIf
public static <T,A,R extends Collection<A>> R collectIf(ArrayList<T> list, Predicate<? super T> predicate, Function<? super T,? extends A> function, R targetCollection)
-
reject
public static <T> ArrayList<T> reject(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.reject(Iterable, Predicate)
-
rejectWith
public static <T,IV> ArrayList<T> rejectWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
reject
public static <T,R extends Collection<T>> R reject(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection)
-
rejectWith
public static <T,P,R extends Collection<T>> R rejectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P injectedValue, R targetCollection)
-
collect
public static <T,A> ArrayList<A> collect(ArrayList<T> list, Function<? super T,? extends A> function)
- See Also:
Iterate.collect(Iterable, Function)
-
collectBoolean
public static <T> MutableBooleanList collectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction)
-
collectBoolean
public static <T,R extends MutableBooleanCollection> R collectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction, R target)
-
collectByte
public static <T> MutableByteList collectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction)
-
collectByte
public static <T,R extends MutableByteCollection> R collectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction, R target)
-
collectChar
public static <T> MutableCharList collectChar(ArrayList<T> list, CharFunction<? super T> charFunction)
-
collectChar
public static <T,R extends MutableCharCollection> R collectChar(ArrayList<T> list, CharFunction<? super T> charFunction, R target)
-
collectDouble
public static <T> MutableDoubleList collectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction)
-
collectDouble
public static <T,R extends MutableDoubleCollection> R collectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction, R target)
-
collectFloat
public static <T> MutableFloatList collectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction)
-
collectFloat
public static <T,R extends MutableFloatCollection> R collectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction, R target)
-
collectInt
public static <T> MutableIntList collectInt(ArrayList<T> list, IntFunction<? super T> intFunction)
-
collectInt
public static <T,R extends MutableIntCollection> R collectInt(ArrayList<T> list, IntFunction<? super T> intFunction, R target)
-
collectLong
public static <T> MutableLongList collectLong(ArrayList<T> list, LongFunction<? super T> longFunction)
-
collectLong
public static <T,R extends MutableLongCollection> R collectLong(ArrayList<T> list, LongFunction<? super T> longFunction, R target)
-
collectShort
public static <T> MutableShortList collectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction)
-
collectShort
public static <T,R extends MutableShortCollection> R collectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction, R target)
-
collect
public static <T,A,R extends Collection<A>> R collect(ArrayList<T> list, Function<? super T,? extends A> function, R targetCollection)
-
flatCollect
public static <T,A> ArrayList<A> flatCollect(ArrayList<T> list, Function<? super T,? extends Iterable<A>> function)
- See Also:
Iterate.flatCollect(Iterable, Function)
-
flatCollect
public static <T,A,R extends Collection<A>> R flatCollect(ArrayList<T> list, Function<? super T,? extends Iterable<A>> function, R targetCollection)
-
forEach
public static <T> void forEach(ArrayList<T> list, Procedure<? super T> procedure)
- See Also:
Iterate.forEach(Iterable, Procedure)
-
reverseForEach
public static <T> void reverseForEach(ArrayList<T> list, Procedure<? super T> procedure)
Reverses over the List in reverse order executing the Procedure for each element.
-
reverseForEachWithIndex
public static <T> void reverseForEachWithIndex(ArrayList<T> list, ObjectIntProcedure<? super T> procedure)
Reverses over the List in reverse order executing the Procedure with index for each element.
-
forEach
public static <T> void forEach(ArrayList<T> list, int from, int to, Procedure<? super T> procedure)
Iterates over the section of the list covered by the specified indexes. The indexes are both inclusive. If the from is less than the to, the list is iterated in forward order. If the from is greater than the to, then the list is iterated in the reverse order.e.g. ArrayList<People> people = new ArrayList<People>(FastList.newListWith(ted, mary, bob, sally)); ArrayListIterate.forEach(people, 0, 1, new Procedure<Person>() { public void value(Person person) { LOGGER.info(person.getName()); } });This code would output ted and mary's names.
-
forEachWithIndex
public static <T> void forEachWithIndex(ArrayList<T> list, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the section of the list covered by the specified indexes. The indexes are both inclusive. If the from is less than the to, the list is iterated in forward order. If the from is greater than the to, then the list is iterated in the reverse order. The index passed into the ObjectIntProcedure is the actual index of the range.e.g. ArrayList<People> people = new ArrayList<People>(FastList.newListWith(ted, mary, bob, sally)); ArrayListIterate.forEachWithIndex(people, 0, 1, new ObjectIntProcedure<Person>() { public void value(Person person, int index) { LOGGER.info(person.getName() + " at index: " + index); } });This code would output ted and mary's names.
-
forEachInBoth
public static <T1,T2> void forEachInBoth(ArrayList<T1> list1, ArrayList<T2> list2, Procedure2<? super T1,? super T2> procedure)
-
forEachWithIndex
public static <T> void forEachWithIndex(ArrayList<T> list, ObjectIntProcedure<? super T> objectIntProcedure)
-
detect
public static <T> T detect(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.detect(Iterable, Predicate)
-
detectWith
public static <T,P> T detectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
detectOptional
public static <T> Optional<T> detectOptional(ArrayList<T> list, Predicate<? super T> predicate)
-
detectWithOptional
public static <T,P> Optional<T> detectWithOptional(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
detectIfNone
public static <T> T detectIfNone(ArrayList<T> list, Predicate<? super T> predicate, T ifNone)
-
detectWithIfNone
public static <T,IV> T detectWithIfNone(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue, T ifNone)
-
injectInto
public static <T,IV> IV injectInto(IV injectValue, ArrayList<T> list, Function2<? super IV,? super T,? extends IV> function)
-
injectInto
public static <T> int injectInto(int injectValue, ArrayList<T> list, IntObjectToIntFunction<? super T> function)
-
injectInto
public static <T> long injectInto(long injectValue, ArrayList<T> list, LongObjectToLongFunction<? super T> function)
-
injectInto
public static <T> double injectInto(double injectValue, ArrayList<T> list, DoubleObjectToDoubleFunction<? super T> function)
-
injectInto
public static <T> float injectInto(float injectValue, ArrayList<T> list, FloatObjectToFloatFunction<? super T> function)
-
anySatisfy
public static <T> boolean anySatisfy(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.anySatisfy(Iterable, Predicate)
-
anySatisfyWith
public static <T,P> boolean anySatisfyWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
allSatisfy
public static <T> boolean allSatisfy(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.allSatisfy(Iterable, Predicate)
-
allSatisfyWith
public static <T,IV> boolean allSatisfyWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
noneSatisfy
public static <T> boolean noneSatisfy(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.noneSatisfy(Iterable, Predicate)
-
noneSatisfyWith
public static <T,IV> boolean noneSatisfyWith(ArrayList<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
-
selectAndRejectWith
public static <T,P> Twin<MutableList<T>> selectAndRejectWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
partition
public static <T> PartitionMutableList<T> partition(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.partition(Iterable, Predicate)
-
partitionWith
public static <T,P> PartitionMutableList<T> partitionWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
detectIndex
public static <T> int detectIndex(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.detectIndex(Iterable, Predicate)
-
detectIndexWith
public static <T,P> int detectIndexWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
detectLastIndex
public static <T> int detectLastIndex(ArrayList<T> list, Predicate<? super T> predicate)
-
injectIntoWith
public static <T,IV,P> IV injectIntoWith(IV injectedValue, ArrayList<T> list, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
-
forEachWith
public static <T,P> void forEachWith(ArrayList<T> list, Procedure2<? super T,? super P> procedure, P parameter)
-
collectWith
public static <T,P,A> ArrayList<A> collectWith(ArrayList<T> list, Function2<? super T,? super P,? extends A> function, P parameter)
-
collectWith
public static <T,P,A,R extends Collection<A>> R collectWith(ArrayList<T> list, Function2<? super T,? super P,? extends A> function, P parameter, R targetCollection)
-
removeIf
public static <T> boolean removeIf(ArrayList<T> list, Predicate<? super T> predicate)
- See Also:
Iterate.removeIf(Iterable, Predicate)
-
removeIfWith
public static <T,P> boolean removeIfWith(ArrayList<T> list, Predicate2<? super T,? super P> predicate, P parameter)
-
distinct
@Deprecated public static <T,R extends List<T>> R distinct(ArrayList<T> list, R targetList)
Deprecated.in 7.0.
-
distinct
public static <T> ArrayList<T> distinct(ArrayList<T> list, HashingStrategy<? super T> hashingStrategy)
- Since:
- 7.0.
-
distinctBy
public static <T,V> ArrayList<T> distinctBy(ArrayList<T> list, Function<? super T,? extends V> function)
- Since:
- 9.0.
-
sortThis
public static <T extends Comparable<? super T>> ArrayList<T> sortThis(ArrayList<T> list)
Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList.
-
sortThis
public static <T> ArrayList<T> sortThis(ArrayList<T> list, Comparator<? super T> comparator)
Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList.
-
toArray
public static <T> void toArray(ArrayList<T> list, T[] target, int startIndex, int sourceSize)
-
take
public static <T> ArrayList<T> take(ArrayList<T> list, int count)
- See Also:
Iterate.take(Iterable, int)
-
take
public static <T,R extends Collection<T>> R take(ArrayList<T> list, int count, R targetList)
- See Also:
Iterate.take(Iterable, int)
-
drop
public static <T> ArrayList<T> drop(ArrayList<T> list, int count)
- See Also:
Iterate.drop(Iterable, int)
-
drop
public static <T,R extends Collection<T>> R drop(ArrayList<T> list, int count, R targetList)
- See Also:
Iterate.drop(Iterable, int)
-
groupBy
public static <T,V> FastListMultimap<V,T> groupBy(ArrayList<T> list, Function<? super T,? extends V> function)
- See Also:
Iterate.groupBy(Iterable, Function)
-
groupBy
public static <T,V,R extends MutableMultimap<V,T>> R groupBy(ArrayList<T> list, Function<? super T,? extends V> function, R target)
-
groupByEach
public static <T,V> FastListMultimap<V,T> groupByEach(ArrayList<T> list, 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(ArrayList<T> list, Function<? super T,? extends Iterable<V>> function, R target)
-
groupByUniqueKey
public static <T,V> MutableMap<V,T> groupByUniqueKey(ArrayList<T> list, Function<? super T,? extends V> function)
-
groupByUniqueKey
public static <T,V,R extends MutableMapIterable<V,T>> R groupByUniqueKey(ArrayList<T> list, Function<? super T,? extends V> function, R target)
-
zip
public static <X,Y> MutableList<Pair<X,Y>> zip(ArrayList<X> xs, Iterable<Y> ys)
- See Also:
Iterate.zip(Iterable, Iterable)
-
zip
public static <X,Y,R extends Collection<Pair<X,Y>>> R zip(ArrayList<X> xs, Iterable<Y> ys, R targetCollection)
-
zipWithIndex
public static <T> MutableList<Pair<T,Integer>> zipWithIndex(ArrayList<T> list)
- See Also:
Iterate.zipWithIndex(Iterable)
-
zipWithIndex
public static <T,R extends Collection<Pair<T,Integer>>> R zipWithIndex(ArrayList<T> list, R targetCollection)
-
takeWhile
public static <T> MutableList<T> takeWhile(ArrayList<T> list, Predicate<? super T> predicate)
-
dropWhile
public static <T> MutableList<T> dropWhile(ArrayList<T> list, Predicate<? super T> predicate)
-
partitionWhile
public static <T> PartitionMutableList<T> partitionWhile(ArrayList<T> list, Predicate<? super T> predicate)
-
aggregateInPlaceBy
public static <T,K,V> MutableMap<K,V> aggregateInPlaceBy(ArrayList<T> list, 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(ArrayList<T> list, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V,? super T,? extends V> nonMutatingAggregator)
-
-