public final class ListIterate extends Object
Modifier and Type | Method | Description |
---|---|---|
static <T> boolean |
allSatisfy(List<T> list,
Predicate<? super T> predicate) |
|
static <T,IV> boolean |
allSatisfyWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
|
static <T> boolean |
anySatisfy(List<T> list,
Predicate<? super T> predicate) |
|
static <T,IV> boolean |
anySatisfyWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
|
static <T> void |
appendString(List<T> list,
Appendable appendable,
String start,
String separator,
String end) |
|
static <T> RichIterable<RichIterable<T>> |
chunk(List<T> list,
int size) |
|
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> MutableList<A> |
collectWith(List<T> list,
Function2<? super T,? super P,? extends A> function,
P parameter) |
|
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> 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> T |
detectIfNone(List<T> list,
Predicate<? super T> predicate,
T ifNone) |
|
static <T> int |
detectIndex(List<T> list,
Predicate<? super T> predicate) |
Searches for the first index where the predicate evaluates to true.
|
static <T,P> int |
detectIndexWith(List<T> list,
Predicate2<? super T,? super P> predicate,
P parameter) |
Searches for the first index where the predicate2 and parameter evaluates to true.
|
static <T> int |
detectLastIndex(List<T> list,
Predicate<? super T> predicate) |
Returns the last index where the predicate evaluates to true.
|
static <T> Optional<T> |
detectOptional(List<T> list,
Predicate<? super T> predicate) |
|
static <T,IV> T |
detectWith(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
|
static <T,IV> T |
detectWithIfNone(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue,
T ifNone) |
|
static <T,IV> Optional<T> |
detectWithOptional(List<T> list,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
|
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 boolean |
equals(List<?> one,
List<?> two) |
|
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) |
Iterates over both lists together, evaluating Procedure2 with the current element from each list.
|
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) |
|
static <T> T |
getFirst(List<T> collection) |
Returns the first element of a list.
|
static <T> T |
getLast(List<T> list) |
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> long |
injectInto(long injectValue,
List<T> list,
LongObjectToLongFunction<? super T> function) |
|
static <T,IV> IV |
injectInto(IV injectValue,
List<T> list,
Function2<? super IV,? super T,? extends IV> 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 injectedValue) |
|
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 void |
rangeCheck(int from,
int to,
int size) |
|
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> void |
reverseForEach(List<T> list,
Procedure<? super T> procedure) |
Iterates over the List in reverse order executing the Procedure for each element
|
static <T> void |
reverseForEachWithIndex(List<T> list,
ObjectIntProcedure<? super T> objectIntProcedure) |
Iterates over the List in reverse order executing the Procedure for each element.
|
static <T> List<T> |
reverseThis(List<T> list) |
Reverses the order of the items in the list.
|
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,S> MutableList<S> |
selectInstancesOf(List<T> list,
Class<S> 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 <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,S> MutableList<S> selectInstancesOf(List<T> list, Class<S> 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 getFirst(List<T> collection)
public static <T> T getLast(List<T> list)
public static <T> void forEach(List<T> list, Procedure<? super T> procedure)
Iterate.forEach(Iterable, Procedure)
public static <T> void reverseForEach(List<T> list, Procedure<? super T> procedure)
public static <T> void reverseForEachWithIndex(List<T> list, ObjectIntProcedure<? super T> objectIntProcedure)
public static <T> void forEach(List<T> list, int from, int to, Procedure<? super T> procedure)
e.g. MutableList<People> people = FastList.newListWith(ted, mary, bob, sally); ListIterate.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.
public static <T> void forEachWithIndex(List<T> list, int from, int to, ObjectIntProcedure<? super T> objectIntProcedure)
e.g. MutableList<People> people = FastList.newListWith(ted, mary, bob, sally); ListIterate.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.
public static void rangeCheck(int from, int to, int size)
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> T detect(List<T> list, Predicate<? super T> predicate)
Iterate.detect(Iterable, Predicate)
public static <T,IV> T detectWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T> Optional<T> detectOptional(List<T> list, Predicate<? super T> predicate)
public static <T,IV> Optional<T> detectWithOptional(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T> T detectIfNone(List<T> list, Predicate<? super T> predicate, T ifNone)
public static <T,IV> T detectWithIfNone(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue, T ifNone)
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 <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)
public static <T> boolean anySatisfy(List<T> list, Predicate<? super T> predicate)
Iterate.anySatisfy(Iterable, Predicate)
public static <T,IV> boolean anySatisfyWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T> boolean allSatisfy(List<T> list, Predicate<? super T> predicate)
Iterate.allSatisfy(Iterable, Predicate)
public static <T,IV> boolean allSatisfyWith(List<T> list, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T> boolean noneSatisfy(List<T> list, Predicate<? super T> predicate)
Iterate.noneSatisfy(Iterable, Predicate)
public static <T,P> boolean noneSatisfyWith(List<T> list, Predicate2<? super T,? super P> predicate, P injectedValue)
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)
Iterate.partition(Iterable, Predicate)
public static <T,P> PartitionMutableList<T> partitionWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> boolean removeIf(List<T> list, Predicate<? super T> predicate)
Iterate.removeIf(Iterable, Predicate)
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)
public static <T,P> int detectIndexWith(List<T> list, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> int detectLastIndex(List<T> list, Predicate<? super T> predicate)
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> MutableList<A> collectWith(List<T> list, Function2<? super T,? super P,? extends A> function, 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> List<T> reverseThis(List<T> list)
List<Integer> integers = Lists.fixedSize.of(1, 3, 2); Verify.assertListsEqual(FastList.newListWith(2, 3, 1), ListIterate.reverse(integers));
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)
Iterate.groupByEach(Iterable, 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> T min(List<T> list, Comparator<? super T> comparator)
Iterate.min(Iterable, Comparator)
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 max(List<T> list, Comparator<? super T> comparator)
Iterate.max(Iterable, Comparator)
public static <T> T min(List<T> list)
Iterate.min(Iterable)
public static <T> T max(List<T> list)
Iterate.max(Iterable)
public static <T> RichIterable<RichIterable<T>> chunk(List<T> list, int size)
Iterate.chunk(Iterable, int)
public static <X,Y> MutableList<Pair<X,Y>> zip(List<X> list, Iterable<Y> iterable)
Iterate.zip(Iterable, 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)
Iterate.zipWithIndex(Iterable)
public static <T,R extends Collection<Pair<T,Integer>>> R zipWithIndex(List<T> list, R target)
public static <T> MutableList<T> takeWhile(List<T> list, Predicate<? super T> predicate)
ListIterable.takeWhile(Predicate)
public static <T> MutableList<T> dropWhile(List<T> list, Predicate<? super T> predicate)
ListIterable.dropWhile(Predicate)
public static <T> PartitionMutableList<T> partitionWhile(List<T> list, Predicate<? super T> predicate)
ListIterable.partitionWhile(Predicate)
Copyright © 2004–2017. All rights reserved.