public final class ListIterate
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
allSatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> boolean |
allSatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> boolean |
anySatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> boolean |
anySatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> void |
appendString(java.util.List<T> list,
java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
static <T> com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> |
chunk(java.util.List<T> list,
int size) |
static <T,A> com.gs.collections.api.list.MutableList<A> |
collect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends A> function) |
static <T,A,R extends java.util.Collection<A>> |
collect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends A> function,
R targetCollection) |
static <T> com.gs.collections.api.list.primitive.MutableBooleanList |
collectBoolean(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction) |
static <T> com.gs.collections.api.list.primitive.MutableByteList |
collectByte(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction) |
static <T> com.gs.collections.api.list.primitive.MutableCharList |
collectChar(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction) |
static <T> com.gs.collections.api.list.primitive.MutableDoubleList |
collectDouble(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction) |
static <T> com.gs.collections.api.list.primitive.MutableFloatList |
collectFloat(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction) |
static <T,A> com.gs.collections.api.list.MutableList<A> |
collectIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends A> function) |
static <T,A,R extends java.util.Collection<A>> |
collectIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends A> function,
R targetCollection) |
static <T> com.gs.collections.api.list.primitive.MutableIntList |
collectInt(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction) |
static <T> com.gs.collections.api.list.primitive.MutableLongList |
collectLong(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction) |
static <T> com.gs.collections.api.list.primitive.MutableShortList |
collectShort(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction) |
static <T,P,A> com.gs.collections.api.list.MutableList<A> |
collectWith(java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends A> function,
P parameter) |
static <T,P,A,R extends java.util.Collection<A>> |
collectWith(java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends A> function,
P parameter,
R targetCollection) |
static <T> int |
count(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,IV> int |
countWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T> T |
detect(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> T |
detectIfNone(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
T ifNone) |
static <T> int |
detectIndex(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Searches for the first index where the predicate evaluates to true.
|
static <T,P> int |
detectIndexWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
Searches for the first index where the predicate2 and parameter evaluates to true.
|
static <T,IV> T |
detectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,IV> T |
detectWithIfNone(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue,
T ifNone) |
static <T,R extends java.util.Collection<T>> |
distinct(java.util.List<T> list,
R targetCollection) |
static <T> com.gs.collections.api.list.MutableList<T> |
drop(java.util.List<T> list,
int count) |
static <T,R extends java.util.Collection<T>> |
drop(java.util.List<T> list,
int count,
R targetList) |
static <T> com.gs.collections.api.list.MutableList<T> |
dropWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,A> com.gs.collections.api.list.MutableList<A> |
flatCollect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<A>> function) |
static <T,A,R extends java.util.Collection<A>> |
flatCollect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<A>> function,
R targetCollection) |
static <T> void |
forEach(java.util.List<T> list,
int from,
int to,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
Iterates over the section of the list covered by the specified indexes.
|
static <T> void |
forEach(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
static <T1,T2> void |
forEachInBoth(java.util.List<T1> list1,
java.util.List<T2> list2,
com.gs.collections.api.block.procedure.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(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter) |
static <T> void |
forEachWithIndex(java.util.List<T> list,
int from,
int to,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the section of the list covered by the specified indexes.
|
static <T> void |
forEachWithIndex(java.util.List<T> list,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
static <T> T |
getFirst(java.util.List<T> collection)
Returns the first element of a list.
|
static <T> T |
getLast(java.util.List<T> collection)
Returns the last element of a list.
|
static <T,V> FastListMultimap<V,T> |
groupBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> |
groupBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R target) |
static <T,V> FastListMultimap<V,T> |
groupByEach(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function) |
static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> |
groupByEach(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R target) |
static <T> double |
injectInto(double injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleObjectToDoubleFunction<? super T> function) |
static <T> float |
injectInto(float injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatObjectToFloatFunction<? super T> function) |
static <T> int |
injectInto(int injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntObjectToIntFunction<? super T> function) |
static <T,IV> IV |
injectInto(IV injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function) |
static <T> long |
injectInto(long injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongObjectToLongFunction<? super T> function) |
static <T,IV,P> IV |
injectIntoWith(IV injectedValue,
java.util.List<T> list,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
static <T> T |
max(java.util.List<T> list) |
static <T> T |
max(java.util.List<T> list,
java.util.Comparator<? super T> comparator) |
static <T,V extends java.lang.Comparable<? super V>> |
maxBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T> T |
min(java.util.List<T> list) |
static <T> T |
min(java.util.List<T> list,
java.util.Comparator<? super T> comparator) |
static <T,V extends java.lang.Comparable<? super V>> |
minBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
static <T> boolean |
noneSatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,P> boolean |
noneSatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P injectedValue) |
static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> |
partition(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> |
partitionWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static void |
rangeCheck(int from,
int to,
int size) |
static <T> com.gs.collections.api.list.MutableList<T> |
reject(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,R extends java.util.Collection<T>> |
reject(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection) |
static <T,IV> com.gs.collections.api.list.MutableList<T> |
rejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,P,R extends java.util.Collection<T>> |
rejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T> java.util.List<T> |
removeIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> java.util.List<T> |
removeIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
static <T,P> java.util.List<T> |
removeIfWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
static <T> void |
reverseForEach(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
Reverses over the List in reverse order executing the Procedure for each element
|
static <T> java.util.List<T> |
reverseThis(java.util.List<T> list)
Reverses the order of the items in the list.
|
static <T> com.gs.collections.api.list.MutableList<T> |
select(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T,R extends java.util.Collection<T>> |
select(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection) |
static <T,IV> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> |
selectAndRejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,S> com.gs.collections.api.list.MutableList<S> |
selectInstancesOf(java.util.List<T> list,
java.lang.Class<S> clazz) |
static <T,IV> com.gs.collections.api.list.MutableList<T> |
selectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
static <T,P,R extends java.util.Collection<T>> |
selectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
static <T> double |
sumOfDouble(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> function) |
static <T> double |
sumOfFloat(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> function) |
static <T> long |
sumOfInt(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> function) |
static <T> long |
sumOfLong(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> function) |
static <T> com.gs.collections.api.list.MutableList<T> |
take(java.util.List<T> list,
int count) |
static <T,R extends java.util.Collection<T>> |
take(java.util.List<T> list,
int count,
R targetList) |
static <T> com.gs.collections.api.list.MutableList<T> |
takeWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
static <T> void |
toArray(java.util.List<T> list,
T[] target,
int startIndex,
int sourceSize) |
static <X,Y> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<X,Y>> |
zip(java.util.List<X> list,
java.lang.Iterable<Y> iterable) |
static <X,Y,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<X,Y>>> |
zip(java.util.List<X> list,
java.lang.Iterable<Y> iterable,
R target) |
static <T> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>> |
zipWithIndex(java.util.List<T> list) |
static <T,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>>> |
zipWithIndex(java.util.List<T> list,
R target) |
public static <T> void toArray(java.util.List<T> list,
T[] target,
int startIndex,
int sourceSize)
public static <T> com.gs.collections.api.list.MutableList<T> select(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.select(Iterable, Predicate)public static <T,IV> com.gs.collections.api.list.MutableList<T> selectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T,R extends java.util.Collection<T>> R select(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection)
public static <T,P,R extends java.util.Collection<T>> R selectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection)
public static <T,S> com.gs.collections.api.list.MutableList<S> selectInstancesOf(java.util.List<T> list,
java.lang.Class<S> clazz)
public static <T> int count(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.count(Iterable, Predicate)public static <T,IV> int countWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T,A> com.gs.collections.api.list.MutableList<A> collectIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends A> function)
public static <T,A,R extends java.util.Collection<A>> R collectIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function<? super T,? extends A> function,
R targetCollection)
public static <T> com.gs.collections.api.list.MutableList<T> reject(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.reject(Iterable, Predicate)public static <T,IV> com.gs.collections.api.list.MutableList<T> rejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T,R extends java.util.Collection<T>> R reject(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
R targetCollection)
public static <T,P,R extends java.util.Collection<T>> R rejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection)
public static <T,A> com.gs.collections.api.list.MutableList<A> collect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends A> function)
Iterate.collect(Iterable, Function)public static <T,A,R extends java.util.Collection<A>> R collect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends A> function,
R targetCollection)
public static <T> com.gs.collections.api.list.primitive.MutableBooleanList collectBoolean(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.BooleanFunction<? super T> booleanFunction)
public static <T> com.gs.collections.api.list.primitive.MutableByteList collectByte(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.ByteFunction<? super T> byteFunction)
public static <T> com.gs.collections.api.list.primitive.MutableCharList collectChar(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.CharFunction<? super T> charFunction)
public static <T> com.gs.collections.api.list.primitive.MutableDoubleList collectDouble(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> doubleFunction)
public static <T> com.gs.collections.api.list.primitive.MutableFloatList collectFloat(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> floatFunction)
public static <T> com.gs.collections.api.list.primitive.MutableIntList collectInt(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> intFunction)
public static <T> com.gs.collections.api.list.primitive.MutableLongList collectLong(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> longFunction)
public static <T> com.gs.collections.api.list.primitive.MutableShortList collectShort(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.ShortFunction<? super T> shortFunction)
public static <T,A> com.gs.collections.api.list.MutableList<A> flatCollect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<A>> function)
public static <T,A,R extends java.util.Collection<A>> R flatCollect(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<A>> function,
R targetCollection)
public static <T> T getFirst(java.util.List<T> collection)
public static <T> T getLast(java.util.List<T> collection)
public static <T> void forEach(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
Iterate.forEach(Iterable, Procedure)public static <T> void reverseForEach(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
public static <T> void forEach(java.util.List<T> list,
int from,
int to,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
e.g. MutableListThis code would output ted and mary's names.people = FastList.newListWith(ted, mary, bob, sally); ListIterate.forEach(people, 0, 1, new Procedure () { public void value(Person person) { LOGGER.info(person.getName()); } });
public static <T> void forEachWithIndex(java.util.List<T> list,
int from,
int to,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
e.g. MutableListThis code would output ted and mary's names.people = 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); } });
public static void rangeCheck(int from,
int to,
int size)
public static <T1,T2> void forEachInBoth(java.util.List<T1> list1,
java.util.List<T2> list2,
com.gs.collections.api.block.procedure.Procedure2<? super T1,? super T2> procedure)
public static <T> void forEachWithIndex(java.util.List<T> list,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
public static <T> T detect(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Iterate.detect(Iterable, Predicate)public static <T,IV> T detectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> T detectIfNone(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
T ifNone)
public static <T,IV> T detectWithIfNone(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue,
T ifNone)
public static <T,IV> IV injectInto(IV injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function)
public static <T> int injectInto(int injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntObjectToIntFunction<? super T> function)
public static <T> long injectInto(long injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongObjectToLongFunction<? super T> function)
public static <T> double injectInto(double injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleObjectToDoubleFunction<? super T> function)
public static <T> float injectInto(float injectValue,
java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatObjectToFloatFunction<? super T> function)
public static <T> long sumOfInt(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.IntFunction<? super T> function)
public static <T> long sumOfLong(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.LongFunction<? super T> function)
public static <T> double sumOfFloat(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.FloatFunction<? super T> function)
public static <T> double sumOfDouble(java.util.List<T> list,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super T> function)
public static <T> boolean anySatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> boolean anySatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> boolean allSatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,IV> boolean allSatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> boolean noneSatisfy(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,P> boolean noneSatisfyWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P injectedValue)
public static <T,IV> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> selectAndRejectWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super IV> predicate,
IV injectedValue)
public static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> partition(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T> java.util.List<T> removeIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,P> java.util.List<T> removeIfWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
public static <T> java.util.List<T> removeIf(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
public static <T> int detectIndex(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
public static <T,P> int detectIndexWith(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
public static <T,IV,P> IV injectIntoWith(IV injectedValue,
java.util.List<T> list,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter)
public static <T,P> void forEachWith(java.util.List<T> list,
com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter)
public static <T,P,A> com.gs.collections.api.list.MutableList<A> collectWith(java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends A> function,
P parameter)
public static <T,P,A,R extends java.util.Collection<A>> R collectWith(java.util.List<T> list,
com.gs.collections.api.block.function.Function2<? super T,? super P,? extends A> function,
P parameter,
R targetCollection)
public static <T,R extends java.util.Collection<T>> R distinct(java.util.List<T> list,
R targetCollection)
public static <T> java.util.List<T> reverseThis(java.util.List<T> list)
List integers = Lists.fixedSize.of(1, 3, 2);
Verify.assertListsEqual(FastList.newListWith(2, 3, 1), ListIterate.reverse(integers));
public static <T> com.gs.collections.api.list.MutableList<T> take(java.util.List<T> list,
int count)
Iterate.take(Iterable, int)public static <T,R extends java.util.Collection<T>> R take(java.util.List<T> list,
int count,
R targetList)
Iterate.take(Iterable, int)public static <T> com.gs.collections.api.list.MutableList<T> drop(java.util.List<T> list,
int count)
Iterate.drop(Iterable, int)public static <T,R extends java.util.Collection<T>> R drop(java.util.List<T> list,
int count,
R targetList)
Iterate.drop(Iterable, int)public static <T> void appendString(java.util.List<T> list,
java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
RichIterable.appendString(Appendable, String, String, String)public static <T,V> FastListMultimap<V,T> groupBy(java.util.List<T> list, com.gs.collections.api.block.function.Function<? super T,? extends V> function)
Iterate.groupBy(Iterable, Function)public static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> R groupBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function,
R target)
public static <T,V> FastListMultimap<V,T> groupByEach(java.util.List<T> list, com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function)
public static <T,V,R extends com.gs.collections.api.multimap.MutableMultimap<V,T>> R groupByEach(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends java.lang.Iterable<V>> function,
R target)
public static <T> T min(java.util.List<T> list,
java.util.Comparator<? super T> comparator)
Iterate.min(Iterable, Comparator)public static <T,V extends java.lang.Comparable<? super V>> T minBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T,V extends java.lang.Comparable<? super V>> T maxBy(java.util.List<T> list,
com.gs.collections.api.block.function.Function<? super T,? extends V> function)
public static <T> T max(java.util.List<T> list,
java.util.Comparator<? super T> comparator)
Iterate.max(Iterable, Comparator)public static <T> T min(java.util.List<T> list)
Iterate.min(Iterable)public static <T> T max(java.util.List<T> list)
Iterate.max(Iterable)public static <T> com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> chunk(java.util.List<T> list,
int size)
Iterate.chunk(Iterable, int)public static <X,Y> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<X,Y>> zip(java.util.List<X> list,
java.lang.Iterable<Y> iterable)
Iterate.zip(Iterable, Iterable)public static <X,Y,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<X,Y>>> R zip(java.util.List<X> list,
java.lang.Iterable<Y> iterable,
R target)
public static <T> com.gs.collections.api.list.MutableList<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>> zipWithIndex(java.util.List<T> list)
Iterate.zipWithIndex(Iterable)public static <T,R extends java.util.Collection<com.gs.collections.api.tuple.Pair<T,java.lang.Integer>>> R zipWithIndex(java.util.List<T> list,
R target)
public static <T> com.gs.collections.api.list.MutableList<T> takeWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
ListIterable.takeWhile(Predicate)public static <T> com.gs.collections.api.list.MutableList<T> dropWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
ListIterable.dropWhile(Predicate)public static <T> com.gs.collections.api.partition.list.PartitionMutableList<T> partitionWhile(java.util.List<T> list,
com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
ListIterable.partitionWhile(Predicate)