Top Inners Constructors Methods
org.eclipse.collections.impl.list.fixed

public abstract Class AbstractMemoryEfficientMutableList<T>

extends AbstractMutableList<T>
implements FixedSizeList<T>, RandomAccess
Class Inheritance
All Implemented Interfaces
java.util.RandomAccess, org.eclipse.collections.api.list.FixedSizeList, org.eclipse.collections.api.collection.FixedSizeCollection, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable, java.util.Collection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.ordered.ReversibleIterable, org.eclipse.collections.api.ordered.OrderedIterable, java.lang.Cloneable, java.util.List, java.util.SequencedCollection
Known Direct Subclasses
org.eclipse.collections.impl.list.fixed.DoubletonList, org.eclipse.collections.impl.list.fixed.EmptyList, org.eclipse.collections.impl.list.fixed.QuadrupletonList, org.eclipse.collections.impl.list.fixed.QuintupletonList, org.eclipse.collections.impl.list.fixed.SextupletonList, org.eclipse.collections.impl.list.fixed.SingletonList, org.eclipse.collections.impl.list.fixed.TripletonList
Imports
java.util.Collection, .Collections, .Comparator, .ListIterator, .RandomAccess, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.list.FixedSizeList, .MutableList, org.eclipse.collections.impl.block.factory.Comparators, org.eclipse.collections.impl.list.mutable.AbstractMutableList, org.eclipse.collections.impl.utility.Iterate

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
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(Collection<? extends T> collection)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.addAll.

Implements java.util.Collection.addAll, java.util.List.addAll, org.eclipse.collections.api.collection.FixedSizeCollection.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (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 boolean
public void
public FixedSizeList<T>
private void
insertionSort(Comparator<? super T> comparator)

private boolean
isPreviousGreaterThanCurrent(Comparator<? super T> comparator, int index)

public ListIterator<T>
listIterator(int index)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.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), starting at the specified position in the list.

public ListIterator<T>
public boolean
remove(Object o)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.remove.

Implements java.util.Collection.remove, java.util.List.remove, org.eclipse.collections.api.collection.FixedSizeCollection.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation).

public T
remove(int index)

Implements java.util.List.remove.

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

public boolean
removeAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeAll.

Implements java.util.Collection.removeAll, java.util.List.removeAll, org.eclipse.collections.api.collection.FixedSizeCollection.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

public boolean
public boolean
public <P> boolean
removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIfWith.

Implements org.eclipse.collections.api.collection.MutableCollection.removeIfWith, org.eclipse.collections.api.collection.FixedSizeCollection.removeIfWith.

Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.

public boolean
retainAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.retainAll.

Implements java.util.Collection.retainAll, java.util.List.retainAll, org.eclipse.collections.api.collection.FixedSizeCollection.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation).

public boolean
public void
sort(Comparator<? super T> comparator)

Overrides default java.util.List.sort.

This method checks if comparator is null and use a ComparableComparator if it is.

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

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.subList.

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 FixedSizeList<T>
public FixedSizeList<T>
public MutableList<T>
withAll(Iterable<? extends T> elements)

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

Implements org.eclipse.collections.api.list.FixedSizeList.withAll, org.eclipse.collections.api.collection.MutableCollection.withAll.

This method allows fixed size collections the ability to add multiple elements to their existing elements.

public MutableList<T>
without(T element)

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

Implements org.eclipse.collections.api.list.FixedSizeList.without, org.eclipse.collections.api.collection.MutableCollection.without.

This method allows fixed size collections the ability to remove elements from their existing elements.

public MutableList<T>
withoutAll(Iterable<? extends T> elements)

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

Implements org.eclipse.collections.api.list.FixedSizeList.withoutAll, org.eclipse.collections.api.collection.MutableCollection.withoutAll.

This method allows fixed size collections the ability to remove multiple elements from their existing elements.

Inherited from org.eclipse.collections.impl.list.mutable.AbstractMutableList:
allSatisfyallSatisfyWithanySatisfyanySatisfyWithappendStringappendStringasParallelasReversedasSynchronizedasUnmodifiablebinarySearchchunkcollectcollectIfcollectWithcontainscontainsAllcorrespondscountcountWithdetectdetectIndexdetectLastIndexdetectOptionaldetectWithdetectWithOptionaldistinctdistinctdistinctBydropdropWhileeachequalsflatCollectforEachforEachWithforEachWithIndexforEachWithIndexgetFirstgetLastgroupBygroupByEachgroupByUniqueKeyhashCodeindexOfinjectIntoinjectIntoinjectIntoinjectIntoinjectIntoWithiteratorlastIndexOfmaxmaxmaxByminminminBynewEmptynoneSatisfynoneSatisfyWithpartitionpartitionWhilepartitionWithrejectrejectWithremoveRangeselectselectAndRejectWithselectInstancesOfselectWithsortThisByBooleansortThisByBytesortThisByCharsortThisByDoublesortThisByFloatsortThisByIntsortThisByLongsortThisByShortsumOfDoublesumOfFloatsumOfIntsumOfLongtaketakeWhiletoSettoSortedListzipzipzipWithIndexzipWithIndex

Constructor Detail

AbstractMemoryEfficientMutableListback to summary
public AbstractMemoryEfficientMutableList()

Method Detail

addback to summary
public boolean add(T o)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.add.

Implements java.util.Collection.add, java.util.List.add, org.eclipse.collections.api.collection.FixedSizeCollection.add.

Doc from java.util.List.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Annotations
@Override
addback to summary
public void add(int index, T element)

Implements java.util.List.add.

Doc from java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Annotations
@Override
addAllback to summary
public boolean addAll(Collection<? extends T> collection)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.addAll.

Implements java.util.Collection.addAll, java.util.List.addAll, org.eclipse.collections.api.collection.FixedSizeCollection.addAll.

Doc from java.util.List.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Annotations
@Override
addAllback to summary
public boolean addAll(int index, Collection<? extends T> collection)

Implements java.util.List.addAll.

Doc from java.util.List.addAll.

Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Annotations
@Override
addAllIterableback to summary
public boolean addAllIterable(Iterable<? extends T> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.addAllIterable.

Implements org.eclipse.collections.api.collection.MutableCollection.addAllIterable, org.eclipse.collections.api.collection.FixedSizeCollection.addAllIterable.

Annotations
@Override
clearback to summary
public void clear()

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.clear.

Implements java.util.Collection.clear, java.util.List.clear, org.eclipse.collections.api.collection.FixedSizeCollection.clear.

Doc from java.util.List.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

Annotations
@Override
cloneback to summary
public FixedSizeList<T> clone()

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.clone.

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

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Annotations
@Override
insertionSortback to summary
private void insertionSort(Comparator<? super T> comparator)
isPreviousGreaterThanCurrentback to summary
private boolean isPreviousGreaterThanCurrent(Comparator<? super T> comparator, int index)
listIteratorback to summary
public ListIterator<T> listIterator(int index)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.listIterator.

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

Doc from java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to next. An initial call to previous would return the element with the specified index minus one.

Annotations
@Override
listIteratorback to summary
public ListIterator<T> listIterator()

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.listIterator.

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

Doc from java.util.List.listIterator.

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

Annotations
@Override
removeback to summary
public boolean remove(Object o)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.remove.

Implements java.util.Collection.remove, java.util.List.remove, org.eclipse.collections.api.collection.FixedSizeCollection.remove.

Doc from java.util.List.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that Objects.equals(o, get(i)) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Annotations
@Override
removeback to summary
public T remove(int index)

Implements java.util.List.remove.

Doc from java.util.List.remove.

Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Annotations
@Override
removeAllback to summary
public boolean removeAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeAll.

Implements java.util.Collection.removeAll, java.util.List.removeAll, org.eclipse.collections.api.collection.FixedSizeCollection.removeAll.

Doc from java.util.List.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

Annotations
@Override
removeAllIterableback to summary
public boolean removeAllIterable(Iterable<?> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.removeAllIterable.

Implements org.eclipse.collections.api.collection.MutableCollection.removeAllIterable, org.eclipse.collections.api.collection.FixedSizeCollection.removeAllIterable.

Annotations
@Override
removeIfback to summary
public boolean removeIf(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIf.

Implements org.eclipse.collections.api.collection.MutableCollection.removeIf, org.eclipse.collections.api.collection.FixedSizeCollection.removeIf.

Doc from org.eclipse.collections.api.collection.MutableCollection.removeIf.

Removes all elements in the collection that evaluate to true for the specified predicate.

e.g.
return lastNames.removeIf(Predicates.isNull());
Annotations
@Override
removeIfWithback to summary
public <P> boolean removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIfWith.

Implements org.eclipse.collections.api.collection.MutableCollection.removeIfWith, org.eclipse.collections.api.collection.FixedSizeCollection.removeIfWith.

Doc from org.eclipse.collections.api.collection.MutableCollection.removeIfWith.

Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.

return lastNames.removeIfWith(Predicates2.isNull(), null);
Annotations
@Override
retainAllback to summary
public boolean retainAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.retainAll.

Implements java.util.Collection.retainAll, java.util.List.retainAll, org.eclipse.collections.api.collection.FixedSizeCollection.retainAll.

Doc from java.util.List.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.

Annotations
@Override
retainAllIterableback to summary
public boolean retainAllIterable(Iterable<?> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.retainAllIterable.

Implements org.eclipse.collections.api.collection.MutableCollection.retainAllIterable, org.eclipse.collections.api.collection.FixedSizeCollection.retainAllIterable.

Annotations
@Override
sortback to summary
public void sort(Comparator<? super T> comparator)

Overrides default java.util.List.sort.

This method checks if comparator is null and use a ComparableComparator if it is.

Annotations
@Override
Since
10.0
subListback to summary
public MutableList<T> subList(int fromIndex, int toIndex)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.subList.

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

Doc from java.util.List.subList.

Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list.

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:

list.subList(from, to).clear();
Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.

The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

Annotations
@Override
tapback to summary
public FixedSizeList<T> tap(Procedure<? super T> procedure)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.tap.

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

Implements org.eclipse.collections.api.list.FixedSizeList.tap, org.eclipse.collections.api.collection.MutableCollection.tap, org.eclipse.collections.api.RichIterable.tap.

Doc from org.eclipse.collections.api.RichIterable.tap.

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

Example using a Java 8 lambda expression:

RichIterable<Person> tapped =
    people.tap(person -> LOGGER.info(person.getName()));
Annotations
@Override
toReversedback to summary
public FixedSizeList<T> toReversed()

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

Implements org.eclipse.collections.api.list.FixedSizeList.toReversed.

Doc from org.eclipse.collections.api.list.MutableList.toReversed.

Returns a new MutableList in reverse order.

Annotations
@Override
withAllback to summary
public MutableList<T> withAll(Iterable<? extends T> elements)

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

Implements org.eclipse.collections.api.list.FixedSizeList.withAll, org.eclipse.collections.api.collection.MutableCollection.withAll.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.withAll.

This method allows fixed size collections the ability to add multiple elements to their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with all the new elements addAll(Collection) added. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.withAll(FastList.newListWith("1", "2"));
return list;
Annotations
@Override
withoutback to summary
public MutableList<T> without(T element)

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

Implements org.eclipse.collections.api.list.FixedSizeList.without, org.eclipse.collections.api.collection.MutableCollection.without.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.without.

This method allows fixed size collections the ability to remove elements from their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with the element removed. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.without("1");
list = list.without("2");
return list;
Annotations
@Override
withoutAllback to summary
public MutableList<T> withoutAll(Iterable<? extends T> elements)

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

Implements org.eclipse.collections.api.list.FixedSizeList.withoutAll, org.eclipse.collections.api.collection.MutableCollection.withoutAll.

Doc from org.eclipse.collections.api.collection.FixedSizeCollection.withoutAll.

This method allows fixed size collections the ability to remove multiple elements from their existing elements. A new instance of MutableCollection is returned containing the elements of the original collection with the given elements removed. Implementations will return a new FixedSizeCollection where possible. In order to use this method properly with mutable and fixed size collections the following approach must be taken:

MutableCollection<String> list;
list = list.withoutAll(FastList.newListWith("1", "2"));
return list;
Annotations
@Override
org.eclipse.collections.impl.list.fixed back to summary

private Class AbstractMemoryEfficientMutableList.SubList<T>

extends AbstractMutableList.SubList<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
protected
SubList(AbstractMutableList<T> list, int fromIndex, int toIndex)

Method Summary

Modifier and TypeMethod and Description
public boolean
addAll(Collection<? extends T> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.SubList.addAll.

Implements java.util.Collection.addAll, java.util.List.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).

public boolean
public boolean
remove(Object o)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.remove.

Implements java.util.Collection.remove, java.util.List.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation).

public boolean
removeAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeAll.

Implements java.util.Collection.removeAll, java.util.List.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

public boolean
public boolean
removeIf(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIf.

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

Removes all elements in the collection that evaluate to true for the specified predicate.

public <P> boolean
removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIfWith.

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

Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.

public boolean
retainAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.retainAll.

Implements java.util.Collection.retainAll, java.util.List.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation).

public boolean
Inherited from org.eclipse.collections.impl.list.mutable.AbstractMutableList.SubList:
addaddaddAllclearclonegetgetFirstgetLastiteratorlistIteratorremovesetsizesubListtoReversedtoStackwriteReplace

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.list.mutable.AbstractMutableList.SubList.serialVersionUID.

Constructor Detail

SubListback to summary
protected SubList(AbstractMutableList<T> list, int fromIndex, int toIndex)

Method Detail

addAllback to summary
public boolean addAll(Collection<? extends T> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.SubList.addAll.

Implements java.util.Collection.addAll, java.util.List.addAll.

Doc from java.util.List.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Annotations
@Override
addAllIterableback to summary
public boolean addAllIterable(Iterable<? extends T> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.addAllIterable.

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

Annotations
@Override
removeback to summary
public boolean remove(Object o)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.remove.

Implements java.util.Collection.remove, java.util.List.remove.

Doc from java.util.List.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that Objects.equals(o, get(i)) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Annotations
@Override
removeAllback to summary
public boolean removeAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeAll.

Implements java.util.Collection.removeAll, java.util.List.removeAll.

Doc from java.util.List.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

Annotations
@Override
removeAllIterableback to summary
public boolean removeAllIterable(Iterable<?> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.removeAllIterable.

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

Annotations
@Override
removeIfback to summary
public boolean removeIf(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIf.

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

Doc from org.eclipse.collections.api.collection.MutableCollection.removeIf.

Removes all elements in the collection that evaluate to true for the specified predicate.

e.g.
return lastNames.removeIf(Predicates.isNull());
Annotations
@Override
removeIfWithback to summary
public <P> boolean removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.removeIfWith.

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

Doc from org.eclipse.collections.api.collection.MutableCollection.removeIfWith.

Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.

return lastNames.removeIfWith(Predicates2.isNull(), null);
Annotations
@Override
retainAllback to summary
public boolean retainAll(Collection<?> collection)

Overrides org.eclipse.collections.impl.list.mutable.AbstractMutableList.retainAll.

Implements java.util.Collection.retainAll, java.util.List.retainAll.

Doc from java.util.List.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.

Annotations
@Override
retainAllIterableback to summary
public boolean retainAllIterable(Iterable<?> iterable)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection.retainAllIterable.

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

Annotations
@Override