Top Constructors Methods
org.eclipse.collections.impl.list.mutable

public abstract Class AbstractListAdapter<T>

extends AbstractCollectionAdapter<T>
implements MutableList<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.ordered.ReversibleIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable, java.lang.Cloneable, java.util.List, java.util.SequencedCollection, java.util.Collection, org.eclipse.collections.api.collection.MutableCollection
Known Direct Subclasses
org.eclipse.collections.impl.list.mutable.ArrayListAdapter, org.eclipse.collections.impl.list.mutable.ListAdapter, org.eclipse.collections.impl.list.mutable.RandomAccessListAdapter
Annotations
@SuppressWarnings:AbstractMethodOverridesConcreteMethod
Imports
java.util.Collection, .List, .ListIterator, java.util.concurrent.ExecutorService, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.list.MutableList, .ParallelListIterable, org.eclipse.collections.api.multimap.list.MutableListMultimap, org.eclipse.collections.api.partition.list.PartitionMutableList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.block.factory.Functions, .HashingStrategies, org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter, org.eclipse.collections.impl.lazy.ReverseIterable, org.eclipse.collections.impl.lazy.parallel.list.ListIterableParallelIterable, org.eclipse.collections.impl.stack.mutable.ArrayStack, org.eclipse.collections.impl.utility.ListIterate

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(int index, T element)

Implements java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation).

public boolean
addAll(int index, Collection<? extends T> collection)

Implements java.util.List.addAll.

Inserts all of the elements in the specified collection into this list at the specified position (optional operation).

public ParallelListIterable<T>
asParallel(ExecutorService executorService, int batchSize)

Implements org.eclipse.collections.api.list.ListIterable.asParallel.

Returns a parallel iterable of this ListIterable.

public ReverseIterable<T>
asReversed()

Overrides default org.eclipse.collections.api.ordered.ReversibleIterable.asReversed.

Returns a reversed view of this ReversibleIterable.

public MutableList<T>
clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.collections.api.list.MutableList.clone.

Creates and returns a copy of this object.

public <V> MutableList<V>
collect(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.collect.

Overrides default org.eclipse.collections.api.list.MutableList.collect.

Implements org.eclipse.collections.api.collection.MutableCollection.collect.

Returns a new MutableCollection with the results of applying the specified function to each element of the source collection.

public <V> MutableList<V>
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.collectIf.

Overrides default org.eclipse.collections.api.list.MutableList.collectIf.

Implements org.eclipse.collections.api.collection.MutableCollection.collectIf.

Returns a new MutableCollection with the results of applying the specified function to each element of the source collection, but only for elements that evaluate to true for the specified predicate.

public <P, V> MutableList<V>
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.collectWith.

Overrides default org.eclipse.collections.api.list.MutableList.collectWith.

Implements org.eclipse.collections.api.collection.MutableCollection.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

public <V> MutableList<T>
distinctBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.list.MutableList.distinctBy.

Returns a new ListIterable containing the distinct elements in this list.

public boolean
equals(Object o)

Overrides java.lang.Object.equals.

Implements java.util.Collection.equals, java.util.List.equals, org.eclipse.collections.api.list.ListIterable.equals.

Compares the specified object with this list for equality.

public <V> MutableList<V>
public T
get(int index)

Implements java.util.List.get, org.eclipse.collections.api.list.ListIterable.get.

Returns the element at the specified position in this list.

protected abstract List<T>
public <V> MutableListMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.groupBy.

Implements org.eclipse.collections.api.list.MutableList.groupBy, org.eclipse.collections.api.collection.MutableCollection.groupBy.

For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable.

public <V> MutableListMultimap<V, T>
public int
public int
indexOf(Object o)

Overrides default org.eclipse.collections.api.list.MutableList.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

public int
lastIndexOf(Object o)

Implements java.util.List.lastIndexOf, org.eclipse.collections.api.list.ListIterable.lastIndexOf.

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

public ListIterator<T>
listIterator()

Implements java.util.List.listIterator, org.eclipse.collections.api.list.ListIterable.listIterator.

Returns a list iterator over the elements in this list (in proper sequence).

public ListIterator<T>
listIterator(int index)

Implements java.util.List.listIterator, org.eclipse.collections.api.list.ListIterable.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.partitionWith.

Implements org.eclipse.collections.api.list.MutableList.partitionWith, org.eclipse.collections.api.collection.MutableCollection.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

public MutableList<T>
reject(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.reject.

Overrides default org.eclipse.collections.api.list.MutableList.reject.

Implements org.eclipse.collections.api.collection.MutableCollection.reject.

Returns a MutableCollection with all elements that evaluate to false for the specified predicate.

public <P> MutableList<T>
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.rejectWith.

Overrides default org.eclipse.collections.api.list.MutableList.rejectWith.

Implements org.eclipse.collections.api.collection.MutableCollection.rejectWith.

Returns a MutableCollection with all elements that evaluate to false for the specified predicate2 and parameter.

public T
remove(int index)

Implements java.util.List.remove.

Removes the element at the specified position in this list (optional operation).

public MutableList<T>
select(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.select.

Overrides default org.eclipse.collections.api.list.MutableList.select.

Implements org.eclipse.collections.api.collection.MutableCollection.select.

Returns a MutableCollection with all elements that evaluate to true for the specified predicate.

public <S> MutableList<S>
public <P> MutableList<T>
selectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.selectWith.

Overrides default org.eclipse.collections.api.list.MutableList.selectWith.

Implements org.eclipse.collections.api.collection.MutableCollection.selectWith.

Returns a MutableCollection with all elements that evaluate to true for the specified predicate2 and parameter.

public T
set(int index, T element)

Implements java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
public MutableList<T>
subList(int fromIndex, int toIndex)

Implements org.eclipse.collections.api.list.MutableList.subList.

Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

public MutableList<T>
tap(Procedure<? super T> procedure)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.tap.

Overrides default org.eclipse.collections.api.list.MutableList.tap.

Implements org.eclipse.collections.api.collection.MutableCollection.tap.

Executes the Procedure for each element in the iterable and returns this.

public MutableStack<T>
toStack()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.toStack.

Converts the OrderedIterable to a mutable MutableStack implementation.

public <S> MutableList<Pair<T, S>>
zip(Iterable<S> that)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter.zip.

Implements org.eclipse.collections.api.list.MutableList.zip, org.eclipse.collections.api.collection.MutableCollection.zip.

Returns a RichIterable formed from this RichIterable and another RichIterable by combining corresponding elements in pairs.

public MutableList<Pair<T, Integer>>
Inherited from org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter:
addaddAlladdAllIterableallSatisfyallSatisfyWithanySatisfyanySatisfyWithappendStringasLazychunkclearcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithcontainscontainsAllcontainsAllArgumentscontainsAllIterablecountcountWithdetectdetectIfNonedetectOptionaldetectWithdetectWithIfNonedetectWithOptionaleachflatCollectforEachWithforEachWithIndexgetFirstgetLastgetOnlygroupBygroupByEachgroupByUniqueKeygroupByUniqueKeyinjectIntoinjectIntoinjectIntoinjectIntoinjectIntoinjectIntoWithintoisEmptyiteratormaxmaxmaxByminminminBynoneSatisfynoneSatisfyWithnotEmptyrejectrejectWithremoveremoveAllremoveAllIterableremoveIfremoveIfWithretainAllretainAllIterableselectselectAndRejectWithselectWithsizesumByDoublesumByFloatsumByIntsumByLongsumOfDoublesumOfFloatsumOfIntsumOfLongtoArraytoArraytoBagtoBiMaptoListtoMaptoMaptoSettoSortedBagtoSortedBagtoSortedListtoSortedMaptoSortedMaptoSortedSettoSortedSettoStringwrapzipzipWithIndex