public final class ListAdapter<T> extends AbstractListAdapter<T> implements Serializable
To create a new wrapper around an existing List instance, use the adapt(List) factory method.
| Modifier and Type | Method and Description |
|---|---|
static <E> com.gs.collections.api.list.MutableList<E> |
adapt(List<E> list) |
boolean |
allSatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
boolean |
anySatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
com.gs.collections.api.list.ParallelListIterable<T> |
asParallel(ExecutorService executorService,
int batchSize) |
com.gs.collections.api.list.MutableList<T> |
asSynchronized() |
com.gs.collections.api.list.MutableList<T> |
asUnmodifiable() |
com.gs.collections.api.list.MutableList<T> |
clone() |
<S> boolean |
corresponds(com.gs.collections.api.ordered.OrderedIterable<S> other,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super S> predicate) |
int |
count(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
T |
detect(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
T |
detectIfNone(com.gs.collections.api.block.predicate.Predicate<? super T> predicate,
com.gs.collections.api.block.function.Function0<? extends T> function) |
int |
detectIndex(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
int |
detectLastIndex(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
com.gs.collections.api.list.MutableList<T> |
distinct() |
com.gs.collections.api.list.MutableList<T> |
distinct(com.gs.collections.api.block.HashingStrategy<? super T> hashingStrategy) |
com.gs.collections.api.list.MutableList<T> |
drop(int count) |
com.gs.collections.api.list.MutableList<T> |
dropWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
void |
each(com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
void |
forEach(int fromIndex,
int toIndex,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
void |
forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
void |
forEachWithIndex(int fromIndex,
int toIndex,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
void |
forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
<IV> IV |
injectInto(IV injectedValue,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function) |
com.gs.collections.api.list.MutableList<T> |
newEmpty()
Deprecated.
use
FastList.newList() instead (inlineable) |
boolean |
noneSatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
com.gs.collections.api.partition.list.PartitionMutableList<T> |
partitionWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
void |
reverseForEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
<S> com.gs.collections.api.list.MutableList<S> |
selectInstancesOf(Class<S> clazz) |
ListAdapter<T> |
sortThis() |
ListAdapter<T> |
sortThis(Comparator<? super T> comparator) |
com.gs.collections.api.list.MutableList<T> |
take(int count) |
com.gs.collections.api.list.MutableList<T> |
takeWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
com.gs.collections.api.list.ImmutableList<T> |
toImmutable() |
com.gs.collections.api.stack.MutableStack<T> |
toStack() |
ListAdapter<T> |
with(T... elements) |
ListAdapter<T> |
with(T element) |
ListAdapter<T> |
with(T element1,
T element2) |
ListAdapter<T> |
with(T element1,
T element2,
T element3) |
ListAdapter<T> |
withAll(Iterable<? extends T> elements) |
ListAdapter<T> |
without(T element) |
ListAdapter<T> |
withoutAll(Iterable<? extends T> elements) |
add, addAll, asReversed, binarySearch, binarySearch, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, equals, flatCollect, get, groupBy, groupByEach, hashCode, indexOf, lastIndexOf, listIterator, listIterator, partition, partitionWith, reject, rejectWith, remove, reverseThis, select, selectWith, set, shuffleThis, shuffleThis, sortThisBy, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, subList, tap, toReversed, zip, zipWithIndexadd, addAll, addAllIterable, aggregateBy, aggregateInPlaceBy, allSatisfyWith, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detectWith, detectWithIfNone, flatCollect, forEachWith, getFirst, getLast, groupBy, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectIntoWith, isEmpty, iterator, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfyWith, notEmpty, reject, rejectWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, selectAndRejectWith, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexaddAllIterable, aggregateBy, aggregateInPlaceBy, groupByUniqueKey, injectIntoWith, removeAllIterable, removeIf, removeIfWith, retainAllIterable, selectAndRejectWithadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamallSatisfyWith, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detectWith, detectWithIfNone, flatCollect, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, maxBy, min, minBy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toStringpublic static <E> com.gs.collections.api.list.MutableList<E> adapt(List<E> list)
public com.gs.collections.api.list.ImmutableList<T> toImmutable()
public com.gs.collections.api.list.MutableList<T> asUnmodifiable()
public com.gs.collections.api.list.MutableList<T> asSynchronized()
public com.gs.collections.api.list.MutableList<T> clone()
clone in interface com.gs.collections.api.list.MutableList<T>clone in class AbstractListAdapter<T>@Deprecated public com.gs.collections.api.list.MutableList<T> newEmpty()
FastList.newList() instead (inlineable)public void forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
forEach in interface com.gs.collections.api.InternalIterable<T>forEach in class AbstractCollectionAdapter<T>public void each(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
each in interface com.gs.collections.api.RichIterable<T>each in class AbstractCollectionAdapter<T>public void reverseForEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
reverseForEach in interface com.gs.collections.api.ordered.ReversibleIterable<T>public void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface com.gs.collections.api.InternalIterable<T>forEachWithIndex in interface com.gs.collections.api.ordered.OrderedIterable<T>forEachWithIndex in class AbstractCollectionAdapter<T>public void forEachWithIndex(int fromIndex,
int toIndex,
com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface com.gs.collections.api.ordered.OrderedIterable<T>public T detect(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
detect in interface com.gs.collections.api.RichIterable<T>detect in class AbstractCollectionAdapter<T>public T detectIfNone(com.gs.collections.api.block.predicate.Predicate<? super T> predicate, com.gs.collections.api.block.function.Function0<? extends T> function)
detectIfNone in interface com.gs.collections.api.RichIterable<T>detectIfNone in class AbstractCollectionAdapter<T>public int detectIndex(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
detectIndex in interface com.gs.collections.api.ordered.OrderedIterable<T>public int detectLastIndex(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
detectLastIndex in interface com.gs.collections.api.ordered.ReversibleIterable<T>public int count(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
count in interface com.gs.collections.api.RichIterable<T>count in class AbstractCollectionAdapter<T>public <S> boolean corresponds(com.gs.collections.api.ordered.OrderedIterable<S> other,
com.gs.collections.api.block.predicate.Predicate2<? super T,? super S> predicate)
corresponds in interface com.gs.collections.api.ordered.OrderedIterable<T>public boolean anySatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
anySatisfy in interface com.gs.collections.api.RichIterable<T>anySatisfy in class AbstractCollectionAdapter<T>public boolean allSatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
allSatisfy in interface com.gs.collections.api.RichIterable<T>allSatisfy in class AbstractCollectionAdapter<T>public boolean noneSatisfy(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
noneSatisfy in interface com.gs.collections.api.RichIterable<T>noneSatisfy in class AbstractCollectionAdapter<T>public <IV> IV injectInto(IV injectedValue,
com.gs.collections.api.block.function.Function2<? super IV,? super T,? extends IV> function)
injectInto in interface com.gs.collections.api.RichIterable<T>injectInto in class AbstractCollectionAdapter<T>public void forEach(int fromIndex,
int toIndex,
com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
forEach in interface com.gs.collections.api.ordered.OrderedIterable<T>public ListAdapter<T> sortThis(Comparator<? super T> comparator)
sortThis in interface com.gs.collections.api.list.MutableList<T>public ListAdapter<T> sortThis()
sortThis in interface com.gs.collections.api.list.MutableList<T>public ListAdapter<T> with(T element)
public ListAdapter<T> with(T element1, T element2)
public ListAdapter<T> with(T element1, T element2, T element3)
public ListAdapter<T> with(T... elements)
public ListAdapter<T> without(T element)
public ListAdapter<T> withAll(Iterable<? extends T> elements)
public ListAdapter<T> withoutAll(Iterable<? extends T> elements)
public <S> com.gs.collections.api.list.MutableList<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface com.gs.collections.api.collection.MutableCollection<T>selectInstancesOf in interface com.gs.collections.api.list.ListIterable<T>selectInstancesOf in interface com.gs.collections.api.list.MutableList<T>selectInstancesOf in interface com.gs.collections.api.ordered.OrderedIterable<T>selectInstancesOf in interface com.gs.collections.api.ordered.ReversibleIterable<T>selectInstancesOf in interface com.gs.collections.api.RichIterable<T>selectInstancesOf in class AbstractListAdapter<T>public com.gs.collections.api.list.MutableList<T> distinct()
distinct in interface com.gs.collections.api.list.ListIterable<T>distinct in interface com.gs.collections.api.list.MutableList<T>distinct in interface com.gs.collections.api.ordered.OrderedIterable<T>distinct in interface com.gs.collections.api.ordered.ReversibleIterable<T>public com.gs.collections.api.list.MutableList<T> distinct(com.gs.collections.api.block.HashingStrategy<? super T> hashingStrategy)
public com.gs.collections.api.list.MutableList<T> take(int count)
public com.gs.collections.api.list.MutableList<T> takeWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
takeWhile in interface com.gs.collections.api.list.ListIterable<T>takeWhile in interface com.gs.collections.api.list.MutableList<T>takeWhile in interface com.gs.collections.api.ordered.OrderedIterable<T>takeWhile in interface com.gs.collections.api.ordered.ReversibleIterable<T>public com.gs.collections.api.list.MutableList<T> drop(int count)
public com.gs.collections.api.list.MutableList<T> dropWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
dropWhile in interface com.gs.collections.api.list.ListIterable<T>dropWhile in interface com.gs.collections.api.list.MutableList<T>dropWhile in interface com.gs.collections.api.ordered.OrderedIterable<T>dropWhile in interface com.gs.collections.api.ordered.ReversibleIterable<T>public com.gs.collections.api.partition.list.PartitionMutableList<T> partitionWhile(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
partitionWhile in interface com.gs.collections.api.list.ListIterable<T>partitionWhile in interface com.gs.collections.api.list.MutableList<T>partitionWhile in interface com.gs.collections.api.ordered.OrderedIterable<T>partitionWhile in interface com.gs.collections.api.ordered.ReversibleIterable<T>public com.gs.collections.api.stack.MutableStack<T> toStack()
toStack in interface com.gs.collections.api.list.ListIterable<T>toStack in interface com.gs.collections.api.ordered.OrderedIterable<T>toStack in class AbstractListAdapter<T>public com.gs.collections.api.list.ParallelListIterable<T> asParallel(ExecutorService executorService, int batchSize)
asParallel in interface com.gs.collections.api.list.ListIterable<T>asParallel in class AbstractListAdapter<T>Copyright © 2004–2016. All rights reserved.