public final class RandomAccessListIterate extends Object
Modifier and Type | Method and Description |
---|---|
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) |
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) |
static <T> boolean |
allSatisfy(List<T> list,
Predicate<? super T> predicate) |
static <T,P> boolean |
allSatisfyWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> boolean |
anySatisfy(List<T> list,
Predicate<? super T> predicate) |
static <T,P> boolean |
anySatisfyWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> void |
appendString(List<T> list,
Appendable appendable,
String start,
String separator,
String end) |
static <T,A> MutableList<A> |
collect(List<T> list,
Function<? super T,? extends A> function) |
static <T,A,R extends Collection<A>> |
collect(List<T> list,
Function<? super T,? extends A> function,
R targetCollection) |
static <T> MutableBooleanList |
collectBoolean(List<T> list,
BooleanFunction<? super T> booleanFunction) |
static <T,R extends MutableBooleanCollection> |
collectBoolean(List<T> list,
BooleanFunction<? super T> booleanFunction,
R target) |
static <T> MutableByteList |
collectByte(List<T> list,
ByteFunction<? super T> byteFunction) |
static <T,R extends MutableByteCollection> |
collectByte(List<T> list,
ByteFunction<? super T> byteFunction,
R target) |
static <T> MutableCharList |
collectChar(List<T> list,
CharFunction<? super T> charFunction) |
static <T,R extends MutableCharCollection> |
collectChar(List<T> list,
CharFunction<? super T> charFunction,
R target) |
static <T> MutableDoubleList |
collectDouble(List<T> list,
DoubleFunction<? super T> doubleFunction) |
static <T,R extends MutableDoubleCollection> |
collectDouble(List<T> list,
DoubleFunction<? super T> doubleFunction,
R target) |
static <T> MutableFloatList |
collectFloat(List<T> list,
FloatFunction<? super T> floatFunction) |
static <T,R extends MutableFloatCollection> |
collectFloat(List<T> list,
FloatFunction<? super T> floatFunction,
R target) |
static <T,A> MutableList<A> |
collectIf(List<T> list,
Predicate<? super T> predicate,
Function<? super T,? extends A> function) |
static <T,A,R extends Collection<A>> |
collectIf(List<T> list,
Predicate<? super T> predicate,
Function<? super T,? extends A> function,
R targetCollection) |
static <T> MutableIntList |
collectInt(List<T> list,
IntFunction<? super T> intFunction) |
static <T,R extends MutableIntCollection> |
collectInt(List<T> list,
IntFunction<? super T> intFunction,
R target) |
static <T> MutableLongList |
collectLong(List<T> list,
LongFunction<? super T> longFunction) |
static <T,R extends MutableLongCollection> |
collectLong(List<T> list,
LongFunction<? super T> longFunction,
R target) |
static <T> MutableShortList |
collectShort(List<T> list,
ShortFunction<? super T> shortFunction) |
static <T,R extends MutableShortCollection> |
collectShort(List<T> list,
ShortFunction<? super T> shortFunction,
R target) |
static <T,P,A,R extends Collection<A>> |
collectWith(List<T> list,
Function2<? super T,? super P,? extends A> function,
P parameter,
R targetCollection) |
static <T,P> boolean |
corresponds(List<T> list,
OrderedIterable<P> other,
Predicate2<? super T,? super P> predicate) |
static <T> int |
count(List<T> list,
Predicate<? super T> predicate) |
static <T,IV> int |
countWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> T |
detect(List<T> list,
Predicate<? super T> predicate) |
static <T> int |
detectIndex(List<T> list,
Predicate<? super T> predicate)
Searches for the first occurrence where the predicate evaluates to true.
|
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.
|
static <T> int |
detectLastIndex(List<T> list,
Predicate<? super T> predicate) |
static <T,P> T |
detectWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> MutableList<T> |
distinct(List<T> list) |
static <T> MutableList<T> |
distinct(List<T> list,
HashingStrategy<? super T> hashingStrategy) |
static <T,R extends List<T>> |
distinct(List<T> list,
R targetList)
Deprecated.
in 7.0.
|
static <T> MutableList<T> |
drop(List<T> list,
int count) |
static <T,R extends Collection<T>> |
drop(List<T> list,
int count,
R targetList) |
static <T> MutableList<T> |
dropWhile(List<T> list,
Predicate<? super T> predicate) |
static <T,A> MutableList<A> |
flatCollect(List<T> list,
Function<? super T,? extends Iterable<A>> function) |
static <T,A,R extends Collection<A>> |
flatCollect(List<T> list,
Function<? super T,? extends Iterable<A>> function,
R targetCollection) |
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.
|
static <T> void |
forEach(List<T> list,
Procedure<? super T> procedure) |
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.
|
static <T,P> void |
forEachWith(List<T> list,
Procedure2<? super T,? super P> procedure,
P parameter) |
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.
|
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.
|
static <T> T |
getLast(List<T> collection)
Returns the last element of a list.
|
static <T,V> FastListMultimap<V,T> |
groupBy(List<T> list,
Function<? super T,? extends V> function) |
static <T,V,R extends MutableMultimap<V,T>> |
groupBy(List<T> list,
Function<? super T,? extends V> function,
R target) |
static <T,V> FastListMultimap<V,T> |
groupByEach(List<T> list,
Function<? super T,? extends Iterable<V>> function) |
static <T,V,R extends MutableMultimap<V,T>> |
groupByEach(List<T> list,
Function<? super T,? extends Iterable<V>> function,
R target) |
static <K,T> MutableMap<K,T> |
groupByUniqueKey(List<T> list,
Function<? super T,? extends K> function) |
static <K,T,R extends MutableMap<K,T>> |
groupByUniqueKey(List<T> list,
Function<? super T,? extends K> function,
R target) |
static <T> double |
injectInto(double injectValue,
List<T> list,
DoubleObjectToDoubleFunction<? super T> function) |
static <T> float |
injectInto(float injectValue,
List<T> list,
FloatObjectToFloatFunction<? super T> function) |
static <T> int |
injectInto(int injectValue,
List<T> list,
IntObjectToIntFunction<? super T> function) |
static <T,IV> IV |
injectInto(IV injectValue,
List<T> list,
Function2<? super IV,? super T,? extends IV> function) |
static <T> long |
injectInto(long injectValue,
List<T> list,
LongObjectToLongFunction<? super T> function) |
static <T,IV,P> IV |
injectIntoWith(IV injectedValue,
List<T> list,
Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
static <T> T |
max(List<T> list) |
static <T> T |
max(List<T> list,
Comparator<? super T> comparator) |
static <T,V extends Comparable<? super V>> |
maxBy(List<T> list,
Function<? super T,? extends V> function) |
static <T> T |
min(List<T> list) |
static <T> T |
min(List<T> list,
Comparator<? super T> comparator) |
static <T,V extends Comparable<? super V>> |
minBy(List<T> list,
Function<? super T,? extends V> function) |
static <T> boolean |
noneSatisfy(List<T> list,
Predicate<? super T> predicate) |
static <T,P> boolean |
noneSatisfyWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> PartitionMutableList<T> |
partition(List<T> list,
Predicate<? super T> predicate) |
static <T> PartitionMutableList<T> |
partitionWhile(List<T> list,
Predicate<? super T> predicate) |
static <T,P> PartitionMutableList<T> |
partitionWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> MutableList<T> |
reject(List<T> list,
Predicate<? super T> predicate) |
static <T,R extends Collection<T>> |
reject(List<T> list,
Predicate<? super T> predicate,
R targetCollection) |
static <T,IV> MutableList<T> |
rejectWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,P,R extends Collection<T>> |
rejectWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T> boolean |
removeIf(List<T> list,
Predicate<? super T> predicate) |
static <T> boolean |
removeIf(List<T> list,
Predicate<? super T> predicate,
Procedure<? super T> procedure) |
static <T,P> boolean |
removeIfWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
static <T,P> boolean |
removeIfWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter,
Procedure<? super T> procedure) |
static <T> MutableList<T> |
select(List<T> list,
Predicate<? super T> predicate) |
static <T,R extends Collection<T>> |
select(List<T> list,
Predicate<? super T> predicate,
R targetCollection) |
static <T,IV> Twin<MutableList<T>> |
selectAndRejectWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> MutableList<T> |
selectInstancesOf(List<?> list,
Class<T> clazz) |
static <T,IV> MutableList<T> |
selectWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,P,R extends Collection<T>> |
selectWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T> boolean |
shortCircuit(List<T> list,
Predicate<? super T> predicate,
boolean expected,
boolean onShortCircuit,
boolean atEnd) |
static <T,P> boolean |
shortCircuitWith(List<T> list,
Predicate2<? super T,? super P> predicate2,
P parameter,
boolean expected,
boolean onShortCircuit,
boolean atEnd) |
static <V,T> MutableMap<V,BigDecimal> |
sumByBigDecimal(List<T> list,
Function<T,V> groupBy,
Function<? super T,BigDecimal> function) |
static <V,T> MutableMap<V,BigInteger> |
sumByBigInteger(List<T> list,
Function<T,V> groupBy,
Function<? super T,BigInteger> function) |
static <V,T> ObjectDoubleMap<V> |
sumByDouble(List<T> list,
Function<T,V> groupBy,
DoubleFunction<? super T> function) |
static <V,T> ObjectDoubleMap<V> |
sumByFloat(List<T> list,
Function<T,V> groupBy,
FloatFunction<? super T> function) |
static <V,T> ObjectLongMap<V> |
sumByInt(List<T> list,
Function<T,V> groupBy,
IntFunction<? super T> function) |
static <V,T> ObjectLongMap<V> |
sumByLong(List<T> list,
Function<T,V> groupBy,
LongFunction<? super T> function) |
static <T> BigDecimal |
sumOfBigDecimal(List<T> list,
Function<? super T,BigDecimal> function) |
static <T> BigInteger |
sumOfBigInteger(List<T> list,
Function<? super T,BigInteger> function) |
static <T> double |
sumOfDouble(List<T> list,
DoubleFunction<? super T> function) |
static <T> double |
sumOfFloat(List<T> list,
FloatFunction<? super T> function) |
static <T> long |
sumOfInt(List<T> list,
IntFunction<? super T> function) |
static <T> long |
sumOfLong(List<T> list,
LongFunction<? super T> function) |
static <T> MutableList<T> |
take(List<T> list,
int count) |
static <T,R extends Collection<T>> |
take(List<T> list,
int count,
R targetList) |
static <T> MutableList<T> |
takeWhile(List<T> list,
Predicate<? super T> predicate) |
static <T> void |
toArray(List<T> list,
T[] target,
int startIndex,
int sourceSize) |
static <X,Y> MutableList<Pair<X,Y>> |
zip(List<X> list,
Iterable<Y> iterable) |
static <X,Y,R extends Collection<Pair<X,Y>>> |
zip(List<X> list,
Iterable<Y> iterable,
R target) |
static <T> MutableList<Pair<T,Integer>> |
zipWithIndex(List<T> list) |
static <T,R extends Collection<Pair<T,Integer>>> |
zipWithIndex(List<T> list,
R target) |
public static <T> void toArray(List<T> list, T[] target, int startIndex, int sourceSize)
public static <T> MutableList<T> select(List<T> list, Predicate<? super T> predicate)
Iterate.select(Iterable, Predicate)
public static <T,IV> MutableList<T> selectWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T,R extends Collection<T>> R select(List<T> list, Predicate<? super T> predicate, R targetCollection)
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> MutableList<T> selectInstancesOf(List<?> list, Class<T> clazz)
public static <T> int count(List<T> list, Predicate<? super T> predicate)
Iterate.count(Iterable, Predicate)
public static <T,IV> int countWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
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> MutableList<T> reject(List<T> list, Predicate<? super T> predicate)
Iterate.reject(Iterable, Predicate)
public static <T,IV> MutableList<T> rejectWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T,R extends Collection<T>> R reject(List<T> list, Predicate<? super T> predicate, R targetCollection)
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,A> MutableList<A> collect(List<T> list, Function<? super T,? extends A> function)
Iterate.collect(Iterable, 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> 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,A> MutableList<A> flatCollect(List<T> list, Function<? super T,? extends Iterable<A>> function)
Iterate.flatCollect(Iterable, 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> T getLast(List<T> collection)
public static <T> void forEach(List<T> list, Procedure<? super T> procedure)
Iterate.forEach(Iterable, Procedure)
public static <T> void forEach(List<T> list, int from, int to, Procedure<? super T> procedure)
e.g. MutableListpeople = FastList.newListWith(ted, mary, bob, sally); ListIterate.forEach(people, 0, 1, new Procedure () { public void value(Person person) { LOGGER.info(person.getName()); } });
This code would output ted and mary's names.
public static <T> void forEachWithIndex(List<T> list, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)
e.g. MutableListpeople = FastList.newListWith(ted, mary, bob, sally); ListIterate.forEachWithIndex(people, 0, 1, new ObjectIntProcedure () { public void value(Person person, int index) { LOGGER.info(person.getName() + " at index: " + index); } });
This code would output ted and mary's names.
public static <T1,T2> void forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1,? super T2> procedure)
public static <T> void forEachWithIndex(List<T> list, ObjectIntProcedure<? super T> objectIntProcedure)
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> long sumOfInt(List<T> list, IntFunction<? super T> function)
public static <T> long sumOfLong(List<T> list, LongFunction<? super T> function)
public static <T> double sumOfFloat(List<T> list, FloatFunction<? super T> function)
public static <T> double sumOfDouble(List<T> list, DoubleFunction<? 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 <V,T> MutableMap<V,BigDecimal> sumByBigDecimal(List<T> list, Function<T,V> groupBy, Function<? super T,BigDecimal> function)
public static <V,T> MutableMap<V,BigInteger> sumByBigInteger(List<T> list, Function<T,V> groupBy, Function<? super T,BigInteger> function)
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 <T,P> boolean corresponds(List<T> list, OrderedIterable<P> other, Predicate2<? super T,? super P> predicate)
public static <T,P> boolean anySatisfyWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,P> boolean allSatisfyWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,P> boolean noneSatisfyWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,P> T detectWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,IV> Twin<MutableList<T>> selectAndRejectWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T> PartitionMutableList<T> partition(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,P> boolean removeIfWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
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, Procedure<? super T> procedure)
public static <T> int detectIndex(List<T> list, Predicate<? super T> predicate)
Iterate.detectIndex(Iterable, Predicate)
public static <T,IV> int detectIndexWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
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,P> void forEachWith(List<T> list, Procedure2<? super T,? super P> procedure, P parameter)
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)
@Deprecated public static <T,R extends List<T>> R distinct(List<T> list, R targetList)
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> take(List<T> list, int count)
Iterate.take(Iterable, int)
public static <T,R extends Collection<T>> R take(List<T> list, int count, R targetList)
Iterate.take(Iterable, int)
public static <T> MutableList<T> drop(List<T> list, int count)
Iterate.drop(Iterable, int)
public static <T,R extends Collection<T>> R drop(List<T> list, int count, R targetList)
Iterate.drop(Iterable, int)
public static <T> void appendString(List<T> list, Appendable appendable, String start, String separator, String end)
public static <T,V> FastListMultimap<V,T> groupBy(List<T> list, Function<? super T,? extends V> function)
Iterate.groupBy(Iterable, 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 MutableMap<K,T>> R groupByUniqueKey(List<T> list, Function<? super T,? extends K> function, R target)
public static <T,V extends Comparable<? super V>> T minBy(List<T> list, Function<? super T,? extends V> function)
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 max(List<T> list, Comparator<? super T> comparator)
public static <T> T min(List<T> list)
public static <T> T max(List<T> list)
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)
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,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> MutableList<T> takeWhile(List<T> list, Predicate<? super T> predicate)
public static <T> MutableList<T> dropWhile(List<T> list, Predicate<? super T> predicate)
public static <T> PartitionMutableList<T> partitionWhile(List<T> list, Predicate<? super T> predicate)
public static <V,T> ObjectLongMap<V> sumByInt(List<T> list, Function<T,V> groupBy, IntFunction<? super T> function)
public static <V,T> ObjectLongMap<V> sumByLong(List<T> list, Function<T,V> groupBy, LongFunction<? super T> function)
public static <V,T> ObjectDoubleMap<V> sumByFloat(List<T> list, Function<T,V> groupBy, FloatFunction<? super T> function)
public static <V,T> ObjectDoubleMap<V> sumByDouble(List<T> list, Function<T,V> groupBy, DoubleFunction<? super T> function)
Copyright © 2004–2016. All rights reserved.