Class ArrayListIterate
java.lang.Object
org.eclipse.collections.impl.utility.ArrayListIterate
This utility class provides optimized iteration pattern implementations that work with java.util.ArrayList.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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> boolean allSatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) static <T> booleananySatisfy(ArrayList<T> list, Predicate<? super T> predicate) static <T,P> boolean anySatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) private static booleancanAccessInternalArray(ArrayList<?> list) static <T,A> ArrayList <A> static <T, A, R extends Collection<A>>
Rstatic <T> MutableBooleanListcollectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction) static <T, R extends MutableBooleanCollection>
RcollectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction, R target) private static <T, R extends MutableBooleanCollection>
RcollectBooleanFromInternalArray(ArrayList<T> source, BooleanFunction<? super T> booleanFunction, int elementsToCollect, 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) private static <T, R extends MutableByteCollection>
RcollectByteFromInternalArray(ArrayList<T> source, ByteFunction<? super T> byteFunction, int elementsToCollect, 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) private static <T, R extends MutableCharCollection>
RcollectCharFromInternalArray(ArrayList<T> source, CharFunction<? super T> charFunction, int elementsToCollect, 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) private static <T, R extends MutableDoubleCollection>
RcollectDoubleFromInternalArray(ArrayList<T> source, DoubleFunction<? super T> doubleFunction, int elementsToCollect, 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) private static <T, R extends MutableFloatCollection>
RcollectFloatFromInternalArray(ArrayList<T> source, FloatFunction<? super T> floatFunction, int elementsToCollect, 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) private static <T, R extends MutableIntCollection>
RcollectIntFromInternalArray(ArrayList<T> source, IntFunction<? super T> intFunction, int elementsToCollect, 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) private static <T, R extends MutableLongCollection>
RcollectLongFromInternalArray(ArrayList<T> source, LongFunction<? super T> longFunction, int elementsToCollect, 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) private static <T, R extends MutableShortCollection>
RcollectShortFromInternalArray(ArrayList<T> source, ShortFunction<? super T> shortFunction, int elementsToCollect, 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> intstatic <T,P> int countWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) static <T> Tstatic <T> TdetectIfNone(ArrayList<T> list, Predicate<? super T> predicate, T ifNone) static <T> intdetectIndex(ArrayList<T> list, Predicate<? super T> predicate) static <T,P> int detectIndexWith(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> T detectWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) static <T,IV> T detectWithIfNone(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> static <T> ArrayList<T> distinct(ArrayList<T> list, HashingStrategy<? super T> hashingStrategy) static <T, R extends List<T>>
RDeprecated.in 7.0.static <T,V> ArrayList <T> distinctBy(ArrayList<T> list, Function<? super T, ? extends V> function) static <T> ArrayList<T> static <T, R extends Collection<T>>
Rstatic <T> MutableList<T> 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> voidIterates over the section of the list covered by the specified indexes.static <T> voidstatic <T1,T2> void forEachInBoth(ArrayList<T1> list1, ArrayList<T2> list2, Procedure2<? super T1, ? super T2> procedure) static <T,P> void forEachWith(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) private static <T> T[]getInternalArray(ArrayList<T> list) static <T,V> FastListMultimap <V, T> static <T, V, R extends MutableMultimap<V,T>>
Rstatic <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> IV injectInto(IV injectValue, ArrayList<T> list, Function2<? super IV, ? super T, ? extends IV> function) static <T,IV, P> IV injectIntoWith(IV injectedValue, ArrayList<T> list, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter) private static booleanisOptimizableArrayList(ArrayList<?> list, int newSize) static <T> booleannoneSatisfy(ArrayList<T> list, Predicate<? super T> predicate) static <T,IV> boolean noneSatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) static <T> PartitionMutableList<T> 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> static <T, R extends Collection<T>>
Rstatic <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> booleanstatic <T,P> boolean removeIfWith(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> static <T, R extends Collection<T>>
Rstatic <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> 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> static <T, R extends Collection<T>>
Rstatic <T> MutableList<T> static <T> voidprivate static <T> voidwipeAndResetTheEnd(int newCurrentFilledIndex, int newSize, T[] newElements, ArrayList<T> list) static <X,Y> MutableList <Pair<X, Y>> static <X, Y, R extends Collection<Pair<X,Y>>>
Rstatic <T> MutableList<Pair<T, Integer>> zipWithIndex(ArrayList<T> list) static <T, R extends Collection<Pair<T,Integer>>>
RzipWithIndex(ArrayList<T> list, R targetCollection)
-
Field Details
-
ELEMENT_DATA_FIELD
-
SIZE_FIELD
-
MIN_DIRECT_ARRAY_ACCESS_SIZE
private static final int MIN_DIRECT_ARRAY_ACCESS_SIZE- See Also:
-
-
Constructor Details
-
ArrayListIterate
private ArrayListIterate()
-
-
Method Details
-
select
-
selectWith
public static <T,IV> ArrayList<T> selectWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) - See Also:
-
select
public static <T, R extends Collection<T>> R select(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection) - See Also:
-
selectWith
public static <T, P, R extends Collection<T>> R selectWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection) - See Also:
-
selectInstancesOf
- See Also:
-
count
-
countWith
public static <T,P> int countWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
collectIf
-
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) - See Also:
-
reject
-
rejectWith
public static <T,IV> ArrayList<T> rejectWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) - See Also:
-
reject
public static <T, R extends Collection<T>> R reject(ArrayList<T> list, Predicate<? super T> predicate, R targetCollection) - See Also:
-
rejectWith
public static <T, P, R extends Collection<T>> R rejectWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P injectedValue, R targetCollection) - See Also:
-
collect
-
collectBoolean
public static <T> MutableBooleanList collectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction) - See Also:
-
collectBoolean
public static <T, R extends MutableBooleanCollection> R collectBoolean(ArrayList<T> list, BooleanFunction<? super T> booleanFunction, R target) - See Also:
-
collectBooleanFromInternalArray
private static <T, R extends MutableBooleanCollection> R collectBooleanFromInternalArray(ArrayList<T> source, BooleanFunction<? super T> booleanFunction, int elementsToCollect, R target) -
collectByte
public static <T> MutableByteList collectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction) - See Also:
-
collectByte
public static <T, R extends MutableByteCollection> R collectByte(ArrayList<T> list, ByteFunction<? super T> byteFunction, R target) - See Also:
-
collectByteFromInternalArray
private static <T, R extends MutableByteCollection> R collectByteFromInternalArray(ArrayList<T> source, ByteFunction<? super T> byteFunction, int elementsToCollect, R target) -
collectChar
public static <T> MutableCharList collectChar(ArrayList<T> list, CharFunction<? super T> charFunction) - See Also:
-
collectChar
public static <T, R extends MutableCharCollection> R collectChar(ArrayList<T> list, CharFunction<? super T> charFunction, R target) - See Also:
-
collectCharFromInternalArray
private static <T, R extends MutableCharCollection> R collectCharFromInternalArray(ArrayList<T> source, CharFunction<? super T> charFunction, int elementsToCollect, R target) -
collectDouble
public static <T> MutableDoubleList collectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction) - See Also:
-
collectDouble
public static <T, R extends MutableDoubleCollection> R collectDouble(ArrayList<T> list, DoubleFunction<? super T> doubleFunction, R target) - See Also:
-
collectDoubleFromInternalArray
private static <T, R extends MutableDoubleCollection> R collectDoubleFromInternalArray(ArrayList<T> source, DoubleFunction<? super T> doubleFunction, int elementsToCollect, R target) -
collectFloat
public static <T> MutableFloatList collectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction) - See Also:
-
collectFloat
public static <T, R extends MutableFloatCollection> R collectFloat(ArrayList<T> list, FloatFunction<? super T> floatFunction, R target) - See Also:
-
collectFloatFromInternalArray
private static <T, R extends MutableFloatCollection> R collectFloatFromInternalArray(ArrayList<T> source, FloatFunction<? super T> floatFunction, int elementsToCollect, R target) -
collectInt
- See Also:
-
collectInt
public static <T, R extends MutableIntCollection> R collectInt(ArrayList<T> list, IntFunction<? super T> intFunction, R target) - See Also:
-
collectIntFromInternalArray
private static <T, R extends MutableIntCollection> R collectIntFromInternalArray(ArrayList<T> source, IntFunction<? super T> intFunction, int elementsToCollect, R target) -
collectLong
public static <T> MutableLongList collectLong(ArrayList<T> list, LongFunction<? super T> longFunction) - See Also:
-
collectLong
public static <T, R extends MutableLongCollection> R collectLong(ArrayList<T> list, LongFunction<? super T> longFunction, R target) - See Also:
-
collectLongFromInternalArray
private static <T, R extends MutableLongCollection> R collectLongFromInternalArray(ArrayList<T> source, LongFunction<? super T> longFunction, int elementsToCollect, R target) -
collectShort
public static <T> MutableShortList collectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction) - See Also:
-
collectShort
public static <T, R extends MutableShortCollection> R collectShort(ArrayList<T> list, ShortFunction<? super T> shortFunction, R target) - See Also:
-
collectShortFromInternalArray
private static <T, R extends MutableShortCollection> R collectShortFromInternalArray(ArrayList<T> source, ShortFunction<? super T> shortFunction, int elementsToCollect, R target) -
collect
public static <T, A, R extends Collection<A>> R collect(ArrayList<T> list, Function<? super T, ? extends A> function, R targetCollection) - See Also:
-
flatCollect
-
flatCollect
public static <T, A, R extends Collection<A>> R flatCollect(ArrayList<T> list, Function<? super T, ? extends Iterable<A>> function, R targetCollection) - See Also:
-
forEach
-
reverseForEach
-
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
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) - See Also:
-
forEachWithIndex
public static <T> void forEachWithIndex(ArrayList<T> list, ObjectIntProcedure<? super T> objectIntProcedure) - See Also:
-
detect
-
detectWith
public static <T,P> T detectWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
detectOptional
-
detectWithOptional
public static <T,P> Optional<T> detectWithOptional(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
detectIfNone
-
detectWithIfNone
public static <T,IV> T detectWithIfNone(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue, T ifNone) - See Also:
-
injectInto
-
injectInto
public static <T> int injectInto(int injectValue, ArrayList<T> list, IntObjectToIntFunction<? super T> function) - See Also:
-
injectInto
public static <T> long injectInto(long injectValue, ArrayList<T> list, LongObjectToLongFunction<? super T> function) - See Also:
-
injectInto
public static <T> double injectInto(double injectValue, ArrayList<T> list, DoubleObjectToDoubleFunction<? super T> function) - See Also:
-
injectInto
public static <T> float injectInto(float injectValue, ArrayList<T> list, FloatObjectToFloatFunction<? super T> function) - See Also:
-
anySatisfy
-
anySatisfyWith
public static <T,P> boolean anySatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
allSatisfy
-
allSatisfyWith
public static <T,IV> boolean allSatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) - See Also:
-
noneSatisfy
-
noneSatisfyWith
public static <T,IV> boolean noneSatisfyWith(ArrayList<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue) - See Also:
-
selectAndRejectWith
public static <T,P> Twin<MutableList<T>> selectAndRejectWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
partition
public static <T> PartitionMutableList<T> partition(ArrayList<T> list, Predicate<? super T> predicate) - See Also:
-
partitionWith
public static <T,P> PartitionMutableList<T> partitionWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) -
detectIndex
-
detectIndexWith
public static <T,P> int detectIndexWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
detectLastIndex
-
injectIntoWith
-
forEachWith
public static <T,P> void forEachWith(ArrayList<T> list, Procedure2<? super T, ? super P> procedure, P parameter) - See Also:
-
collectWith
-
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) - See Also:
-
removeIf
-
removeIfWith
public static <T,P> boolean removeIfWith(ArrayList<T> list, Predicate2<? super T, ? super P> predicate, P parameter) - See Also:
-
distinct
-
distinct
Deprecated.in 7.0. -
distinct
public static <T> ArrayList<T> distinct(ArrayList<T> list, HashingStrategy<? super T> hashingStrategy) - Since:
- 7.0.
-
distinctBy
-
wipeAndResetTheEnd
private static <T> void wipeAndResetTheEnd(int newCurrentFilledIndex, int newSize, T[] newElements, ArrayList<T> list) -
sortThis
Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList. -
sortThis
Mutates the internal array of the ArrayList by sorting it and then returns the same ArrayList. -
toArray
-
take
-
take
- See Also:
-
drop
-
drop
- See Also:
-
groupBy
public static <T,V> FastListMultimap<V,T> groupBy(ArrayList<T> list, Function<? super T, ? extends V> function) - See Also:
-
groupBy
public static <T, V, R extends MutableMultimap<V,T>> R groupBy(ArrayList<T> list, Function<? super T, ? extends V> function, R target) - See Also:
-
groupByEach
public static <T,V> FastListMultimap<V,T> groupByEach(ArrayList<T> list, Function<? super T, ? extends Iterable<V>> function) - See Also:
-
groupByEach
public static <T, V, R extends MutableMultimap<V,T>> R groupByEach(ArrayList<T> list, Function<? super T, ? extends Iterable<V>> function, R target) - See Also:
-
groupByUniqueKey
public static <T,V> MutableMap<V,T> groupByUniqueKey(ArrayList<T> list, Function<? super T, ? extends V> function) - See Also:
-
groupByUniqueKey
public static <T, V, R extends MutableMapIterable<V,T>> R groupByUniqueKey(ArrayList<T> list, Function<? super T, ? extends V> function, R target) - See Also:
-
zip
- See Also:
-
zip
public static <X, Y, R extends Collection<Pair<X,Y>>> R zip(ArrayList<X> xs, Iterable<Y> ys, R targetCollection) - See Also:
-
zipWithIndex
- See Also:
-
zipWithIndex
public static <T, R extends Collection<Pair<T,Integer>>> R zipWithIndex(ArrayList<T> list, R targetCollection) - See Also:
-
takeWhile
-
dropWhile
-
partitionWhile
public static <T> PartitionMutableList<T> partitionWhile(ArrayList<T> list, Predicate<? super T> predicate) -
canAccessInternalArray
-
isOptimizableArrayList
-
getInternalArray
-
aggregateInPlaceBy
public static <T,K, MutableMap<K,V> 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, MutableMap<K,V> V> aggregateBy(ArrayList<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator)
-