Top Description Constructors Methods
org.eclipse.collections.impl.utility.internal

public final Class RandomAccessListIterate

extends Object
Class Inheritance
Imports
java.io.IOException, java.math.BigDecimal, .BigInteger, java.util.Collection, .Comparator, .Iterator, .List, .NoSuchElementException, .Optional, .RandomAccess, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.block.HashingStrategy, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, .Function3, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .DoubleObjectToDoubleFunction, .FloatFunction, .FloatObjectToFloatFunction, .IntFunction, .IntObjectToIntFunction, .LongFunction, .LongObjectToLongFunction, .ObjectIntToObjectFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection, .MutableByteCollection, .MutableCharCollection, .MutableDoubleCollection, .MutableFloatCollection, .MutableIntCollection, .MutableLongCollection, .MutableShortCollection, org.eclipse.collections.api.factory.Lists, .Maps, .Sets, org.eclipse.collections.api.factory.primitive.BooleanLists, .ByteLists, .CharLists, .DoubleLists, .FloatLists, .IntLists, .LongLists, .ObjectDoubleMaps, .ObjectLongMaps, .ShortLists, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.MutableBooleanList, .MutableByteList, .MutableCharList, .MutableDoubleList, .MutableFloatList, .MutableIntList, .MutableLongList, .MutableShortList, org.eclipse.collections.api.map.MutableMap, .MutableMapIterable, org.eclipse.collections.api.map.primitive.MutableObjectDoubleMap, .MutableObjectLongMap, .ObjectDoubleMap, .ObjectLongMap, org.eclipse.collections.api.multimap.MutableMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.partition.list.PartitionMutableList, org.eclipse.collections.api.set.MutableSet, org.eclipse.collections.api.tuple.Pair, .Twin, org.eclipse.collections.impl.block.factory.Functions0, org.eclipse.collections.impl.block.procedure.MutatingAggregationProcedure, .NonMutatingAggregationProcedure, org.eclipse.collections.impl.list.mutable.FastList, org.eclipse.collections.impl.map.mutable.UnifiedMap, org.eclipse.collections.impl.multimap.list.FastListMultimap, org.eclipse.collections.impl.partition.list.PartitionFastList, org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy, org.eclipse.collections.impl.tuple.Tuples, org.eclipse.collections.impl.utility.Iterate, .ListIterate

The ListIterate class provides a few of the methods from the Smalltalk Collection Protocol for use with ArrayLists. This includes do:, select:, reject:, collect:, inject:into:, detect:, detect:ifNone:, anySatisfy: and allSatisfy:

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T, K, V> MutableMap<K, V>
aggregateBy(List<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator)

public static <T, K, V> MutableMap<K, V>
aggregateInPlaceBy(List<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator)

public static <T> boolean
allSatisfy(List<T> list, Predicate<? super T> predicate)

public static <T, P> boolean
allSatisfyWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T> boolean
anySatisfy(List<T> list, Predicate<? super T> predicate)

public static <T, P> boolean
anySatisfyWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T> void
appendString(List<T> list, Appendable appendable, String start, String separator, String end)

public static <T, A> MutableList<A>
collect(List<T> list, Function<? super T, ? extends A> function)

public static <T, A, R extends Collection<A>> R
collect(List<T> list, Function<? super T, ? extends A> function, R targetCollection)

public static <T> MutableBooleanList
collectBoolean(List<T> list, BooleanFunction<? super T> booleanFunction)

public static <T, R extends MutableBooleanCollection> R
collectBoolean(List<T> list, BooleanFunction<? super T> booleanFunction, R target)

public static <T> MutableByteList
collectByte(List<T> list, ByteFunction<? super T> byteFunction)

public static <T, R extends MutableByteCollection> R
collectByte(List<T> list, ByteFunction<? super T> byteFunction, R target)

public static <T> MutableCharList
collectChar(List<T> list, CharFunction<? super T> charFunction)

public static <T, R extends MutableCharCollection> R
collectChar(List<T> list, CharFunction<? super T> charFunction, R target)

public static <T> MutableDoubleList
collectDouble(List<T> list, DoubleFunction<? super T> doubleFunction)

public static <T, R extends MutableDoubleCollection> R
collectDouble(List<T> list, DoubleFunction<? super T> doubleFunction, R target)

public static <T> MutableFloatList
collectFloat(List<T> list, FloatFunction<? super T> floatFunction)

public static <T, R extends MutableFloatCollection> R
collectFloat(List<T> list, FloatFunction<? super T> floatFunction, R target)

public static <T, A> MutableList<A>
collectIf(List<T> list, Predicate<? super T> predicate, Function<? super T, ? extends A> function)

public static <T, A, R extends Collection<A>> R
collectIf(List<T> list, Predicate<? super T> predicate, Function<? super T, ? extends A> function, R targetCollection)

public static <T> MutableIntList
collectInt(List<T> list, IntFunction<? super T> intFunction)

public static <T, R extends MutableIntCollection> R
collectInt(List<T> list, IntFunction<? super T> intFunction, R target)

public static <T> MutableLongList
collectLong(List<T> list, LongFunction<? super T> longFunction)

public static <T, R extends MutableLongCollection> R
collectLong(List<T> list, LongFunction<? super T> longFunction, R target)

public static <T> MutableShortList
collectShort(List<T> list, ShortFunction<? super T> shortFunction)

public static <T, R extends MutableShortCollection> R
collectShort(List<T> list, ShortFunction<? super T> shortFunction, R target)

public static <T, P, A, R extends Collection<A>> R
collectWith(List<T> list, Function2<? super T, ? super P, ? extends A> function, P parameter, R targetCollection)

public static <T, A> MutableList<A>
collectWithIndex(List<T> list, ObjectIntToObjectFunction<? super T, ? extends A> function)

public static <T, A, R extends Collection<A>> R
collectWithIndex(List<T> list, ObjectIntToObjectFunction<? super T, ? extends A> function, R targetCollection)

public static <T, P> boolean
corresponds(List<T> list, OrderedIterable<P> other, Predicate2<? super T, ? super P> predicate)

public static <T> int
count(List<T> list, Predicate<? super T> predicate)

public static <T, IV> int
countWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)

public static <T> T
detect(List<T> list, Predicate<? super T> predicate)

public static <T> int
detectIndex(List<T> list, Predicate<? super T> predicate)

Searches for the first occurrence where the predicate evaluates to true.

public static <T, IV> int
detectIndexWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)

Searches for the first occurrence where the predicate evaluates to true.

public static <T> int
detectLastIndex(List<T> list, Predicate<? super T> predicate)

public static <T> Optional<T>
detectOptional(List<T> list, Predicate<? super T> predicate)

public static <T, P> T
detectWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T, P> Optional<T>
detectWithOptional(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T, R extends List<T>> R
distinct(List<T> list, R targetList)
Deprecated in 7.0.

public static <T> MutableList<T>
distinct(List<T> list)

public static <T> MutableList<T>
distinct(List<T> list, HashingStrategy<? super T> hashingStrategy)

public static <T> MutableList<T>
drop(List<T> list, int count)

public static <T, R extends Collection<T>> R
drop(List<T> list, int count, R targetList)

public static <T> MutableList<T>
dropWhile(List<T> list, Predicate<? super T> predicate)

public static <T, A> MutableList<A>
flatCollect(List<T> list, Function<? super T, ? extends Iterable<A>> function)

public static <T, A, R extends Collection<A>> R
flatCollect(List<T> list, Function<? super T, ? extends Iterable<A>> function, R targetCollection)

public static <T> void
forEach(List<T> list, Procedure<? super T> procedure)

public static <T> void
forEach(List<T> list, int from, int to, Procedure<? super T> procedure)

Iterates over the section of the list covered by the specified indexes.

public static <T1, T2> void
forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1, ? super T2> procedure)

For each element in both of the Lists, operation is evaluated with both elements as parameters.

public static <T, P> void
forEachWith(List<T> list, Procedure2<? super T, ? super P> procedure, P parameter)

public static <T> void
forEachWithIndex(List<T> list, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)

Iterates over the section of the list covered by the specified indexes.

public static <T> void
forEachWithIndex(List<T> list, ObjectIntProcedure<? super T> objectIntProcedure)

Iterates over a collection passing each element and the current relative int index to the specified instance of ObjectIntProcedure.

public static <T> T
getLast(List<T> collection)

Returns the last element of a list.

public static <T, V> FastListMultimap<V, T>
groupBy(List<T> list, Function<? super T, ? extends V> function)

public static <T, V, R extends MutableMultimap<V, T>> R
groupBy(List<T> list, Function<? super T, ? extends V> function, R target)

public static <T, V> FastListMultimap<V, T>
groupByEach(List<T> list, Function<? super T, ? extends Iterable<V>> function)

public static <T, V, R extends MutableMultimap<V, T>> R
groupByEach(List<T> list, Function<? super T, ? extends Iterable<V>> function, R target)

public static <K, T> MutableMap<K, T>
groupByUniqueKey(List<T> list, Function<? super T, ? extends K> function)

public static <K, T, R extends MutableMapIterable<K, T>> R
groupByUniqueKey(List<T> list, Function<? super T, ? extends K> function, R target)

public static <T, IV> IV
injectInto(IV injectValue, List<T> list, Function2<? super IV, ? super T, ? extends IV> function)

public static <T> int
injectInto(int injectValue, List<T> list, IntObjectToIntFunction<? super T> function)

public static <T> long
injectInto(long injectValue, List<T> list, LongObjectToLongFunction<? super T> function)

public static <T> double
injectInto(double injectValue, List<T> list, DoubleObjectToDoubleFunction<? super T> function)

public static <T> float
injectInto(float injectValue, List<T> list, FloatObjectToFloatFunction<? super T> function)

public static <T, IV, P> IV
injectIntoWith(IV injectedValue, List<T> list, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter)

public static <T> T
max(List<T> list, Comparator<? super T> comparator)

public static <T> T
max(List<T> list)

public static <T, V extends Comparable<? super V>> T
maxBy(List<T> list, Function<? super T, ? extends V> function)

public static <T> T
min(List<T> list, Comparator<? super T> comparator)

public static <T> T
min(List<T> list)

public static <T, V extends Comparable<? super V>> T
minBy(List<T> list, Function<? super T, ? extends V> function)

public static <T> boolean
noneSatisfy(List<T> list, Predicate<? super T> predicate)

public static <T, P> boolean
noneSatisfyWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T> PartitionMutableList<T>
partition(List<T> list, Predicate<? super T> predicate)

public static <T> PartitionMutableList<T>
partitionWhile(List<T> list, Predicate<? super T> predicate)

public static <T, P> PartitionMutableList<T>
partitionWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T> MutableList<T>
reject(List<T> list, Predicate<? super T> predicate)

public static <T, R extends Collection<T>> R
reject(List<T> list, Predicate<? super T> predicate, R targetCollection)

public static <T, IV> MutableList<T>
rejectWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)

public static <T, P, R extends Collection<T>> R
rejectWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)

public static <T> boolean
removeIf(List<T> list, Predicate<? super T> predicate)

public static <T> boolean
removeIf(List<T> list, Predicate<? super T> predicate, Procedure<? super T> procedure)

public static <T, P> boolean
removeIfWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter)

public static <T, P> boolean
removeIfWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter, Procedure<? super T> procedure)

public static <T> MutableList<T>
select(List<T> list, Predicate<? super T> predicate)

public static <T, R extends Collection<T>> R
select(List<T> list, Predicate<? super T> predicate, R targetCollection)

public static <T, IV> Twin<MutableList<T>>
selectAndRejectWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)

public static <T> MutableList<T>
selectInstancesOf(List<?> list, Class<T> clazz)

public static <T, IV> MutableList<T>
selectWith(List<T> list, Predicate2<? super T, ? super IV> predicate, IV injectedValue)

public static <T, P, R extends Collection<T>> R
selectWith(List<T> list, Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)

public static <T> boolean
shortCircuit(List<T> list, Predicate<? super T> predicate, boolean expected, boolean onShortCircuit, boolean atEnd)

public static <T, P> boolean
shortCircuitWith(List<T> list, Predicate2<? super T, ? super P> predicate2, P parameter, boolean expected, boolean onShortCircuit, boolean atEnd)

public static <V, T> MutableMap<V, BigDecimal>
sumByBigDecimal(List<T> list, Function<? super T, ? extends V> groupBy, Function<? super T, BigDecimal> function)

public static <V, T> MutableMap<V, BigInteger>
sumByBigInteger(List<T> list, Function<? super T, ? extends V> groupBy, Function<? super T, BigInteger> function)

public static <V, T> ObjectDoubleMap<V>
sumByDouble(List<T> list, Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function)

public static <V, T> ObjectDoubleMap<V>
sumByFloat(List<T> list, Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function)

public static <V, T> ObjectLongMap<V>
sumByInt(List<T> list, Function<? super T, ? extends V> groupBy, IntFunction<? super T> function)

public static <V, T> ObjectLongMap<V>
sumByLong(List<T> list, Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)

public static <T> BigDecimal
sumOfBigDecimal(List<T> list, Function<? super T, BigDecimal> function)

public static <T> BigInteger
sumOfBigInteger(List<T> list, Function<? super T, BigInteger> function)

public static <T> double
sumOfDouble(List<T> list, DoubleFunction<? super T> function)

public static <T> double
sumOfFloat(List<T> list, FloatFunction<? super T> function)

public static <T> long
sumOfInt(List<T> list, IntFunction<? super T> function)

public static <T> long
sumOfLong(List<T> list, LongFunction<? super T> function)

public static <T> MutableList<T>
take(List<T> list, int count)

public static <T, R extends Collection<T>> R
take(List<T> list, int count, R targetList)

public static <T> MutableList<T>
takeWhile(List<T> list, Predicate<? super T> predicate)

public static <T> void
toArray(List<T> list, T[] target, int startIndex, int sourceSize)

public static <X, Y> MutableList<Pair<X, Y>>
zip(List<X> list, Iterable<Y> iterable)

public static <X, Y, R extends Collection<Pair<X, Y>>> R
zip(List<X> list, Iterable<Y> iterable, R target)

public static <T> MutableList<Pair<T, Integer>>
zipWithIndex(List<T> list)

public static <T, R extends Collection<Pair<T, Integer>>> R
zipWithIndex(List<T> list, R target)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait