Top Description Methods
org.eclipse.collections.api.list.primitive

public Interface MutableIntList

extends MutableIntCollection, IntList
Imports
java.util.Comparator, .Random, org.eclipse.collections.api.block.comparator.primitive.IntComparator, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.block.function.primitive.IntIntToObjectFunction, .IntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntIntPredicate, .IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntProcedure, org.eclipse.collections.api.collection.primitive.MutableIntCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair

This file was automatically generated from template file mutablePrimitiveList.stg.
Since
3.0.

Method Summary

Modifier and TypeMethod and Description
public boolean
addAllAtIndex(int index, int... source)

public boolean
addAllAtIndex(int index, IntIterable source)

public void
addAtIndex(int index, int element)

public MutableIntList
public MutableIntList
public MutableList<Integer>
public <V> MutableList<V>
collect(IntToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.collect, org.eclipse.collections.api.list.primitive.IntList.collect.

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

public default <V> MutableList<V>
collectWithIndex(IntIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.IntList.collectWithIndex.

Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.

public MutableIntList
public default MutableIntList
newEmpty()

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.newEmpty.

Creates a new empty mutable version of the same List type.

public MutableIntList
reject(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.reject, org.eclipse.collections.api.list.primitive.IntList.reject.

Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.

public default MutableIntList
rejectWithIndex(IntIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.IntList.rejectWithIndex.

Returns a new MutableIntList excluding all elements with corresponding indexes matching the specified predicate.

public int
removeAtIndex(int index)

public MutableIntList
public MutableIntList
select(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.select, org.eclipse.collections.api.list.primitive.IntList.select.

Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.

public default MutableIntList
selectWithIndex(IntIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.IntList.selectWithIndex.

Returns a new MutableIntList including all elements with corresponding indexes matching the specified predicate.

public int
set(int index, int element)

public default MutableIntList
shuffleThis()

Randomly permutes this list mutating its contents and returns the same list (this).

public default MutableIntList
shuffleThis(Random rnd)

Randomly permutes this list mutating its contents and returns the same list (this).

public MutableIntList
sortThis()

Sorts this list mutating its contents and returns the same mutable list (this).

public default MutableIntList
sortThis(IntComparator comparator)

Sorts the internal data structure of this list and returns the list itself as a convenience.

public default <T> MutableIntList
sortThisBy(IntToObjectFunction<T> function)

Sorts the internal data structure of this list based on the natural order of the key returned by function.

public default <T> MutableIntList
sortThisBy(IntToObjectFunction<T> function, Comparator<? super T> comparator)

Sorts the internal data structure of this list based on the key returned by function using the provided comparator.

public MutableIntList
public default void
swap(int index1, int index2)

public default MutableIntList
public ImmutableIntList
public MutableIntList
public MutableIntList
public MutableIntList
public MutableIntList
public MutableIntList
public default <T> MutableList<IntObjectPair<T>>
zip(Iterable<T> list)

Overrides default org.eclipse.collections.api.list.primitive.IntList.zip.

Returns a MutableList formed from this MutableIntList and a ListIterable by combining corresponding elements in pairs.

public default MutableList<IntIntPair>
zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.IntList.zipInt.

Returns a MutableList formed from this MutableIntList and another IntList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.api.collection.primitive.MutableIntCollection:
addaddAlladdAllclearintIteratorremoveremoveAllremoveAllremoveIfretainAllretainAll
Inherited from org.eclipse.collections.api.list.primitive.IntList:
binarySearchdotProductequalsforEachInBothgethashCodelastIndexOfprimitiveParallelStreamprimitiveStreamspliterator

Method Detail

addAllAtIndexback to summary
public boolean addAllAtIndex(int index, int... source)
addAllAtIndexback to summary
public boolean addAllAtIndex(int index, IntIterable source)
addAtIndexback to summary
public void addAtIndex(int index, int element)
asSynchronizedback to summary
public MutableIntList asSynchronized()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableIntList asUnmodifiable()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.asUnmodifiable.

Annotations
@Override
boxedback to summary
public MutableList<Integer> boxed()
collectback to summary
public <V> MutableList<V> collect(IntToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.collect, org.eclipse.collections.api.list.primitive.IntList.collect.

Doc from org.eclipse.collections.api.IntIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

collectWithIndexback to summary
public default <V> MutableList<V> collectWithIndex(IntIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.IntList.collectWithIndex.

Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.

Annotations
@Override
Since
9.1.
distinctback to summary
public MutableIntList distinct()

Redeclares org.eclipse.collections.api.list.primitive.IntList.distinct.

Annotations
@Override
Since
6.0.
newEmptyback to summary
public default MutableIntList newEmpty()

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.newEmpty.

Creates a new empty mutable version of the same List type.

Since
9.2.
rejectback to summary
public MutableIntList reject(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.reject, org.eclipse.collections.api.list.primitive.IntList.reject.

Doc from org.eclipse.collections.api.IntIterable.reject.

Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.

Annotations
@Override
rejectWithIndexback to summary
public default MutableIntList rejectWithIndex(IntIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.IntList.rejectWithIndex.

Returns a new MutableIntList excluding all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
removeAtIndexback to summary
public int removeAtIndex(int index)
reverseThisback to summary
public MutableIntList reverseThis()
selectback to summary
public MutableIntList select(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.select, org.eclipse.collections.api.list.primitive.IntList.select.

Doc from org.eclipse.collections.api.IntIterable.select.

Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.

Annotations
@Override
selectWithIndexback to summary
public default MutableIntList selectWithIndex(IntIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.IntList.selectWithIndex.

Returns a new MutableIntList including all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
setback to summary
public int set(int index, int element)
shuffleThisback to summary
public default MutableIntList shuffleThis()

Randomly permutes this list mutating its contents and returns the same list (this). Uses java.util.Random as the source of randomness.

shuffleThisback to summary
public default MutableIntList shuffleThis(Random rnd)

Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness.

sortThisback to summary
public MutableIntList sortThis()

Sorts this list mutating its contents and returns the same mutable list (this).

sortThisback to summary
public default MutableIntList sortThis(IntComparator comparator)

Sorts the internal data structure of this list and returns the list itself as a convenience.

sortThisByback to summary
public default <T> MutableIntList sortThisBy(IntToObjectFunction<T> function)

Sorts the internal data structure of this list based on the natural order of the key returned by function.

sortThisByback to summary
public default <T> MutableIntList sortThisBy(IntToObjectFunction<T> function, Comparator<? super T> comparator)

Sorts the internal data structure of this list based on the key returned by function using the provided comparator.

subListback to summary
public MutableIntList subList(int fromIndex, int toIndex)

Redeclares org.eclipse.collections.api.list.primitive.IntList.subList.

Annotations
@Override
swapback to summary
public default void swap(int index1, int index2)
tapback to summary
public default MutableIntList tap(IntProcedure procedure)

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.tap, org.eclipse.collections.api.list.primitive.IntList.tap.

Annotations
@Override
Since
9.0.
toImmutableback to summary
public ImmutableIntList toImmutable()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.toImmutable, org.eclipse.collections.api.list.primitive.IntList.toImmutable.

Returns an immutable copy of this list.

Annotations
@Override
toReversedback to summary
public MutableIntList toReversed()

Redeclares org.eclipse.collections.api.list.primitive.IntList.toReversed.

Annotations
@Override
withback to summary
public MutableIntList with(int element)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.with.

Annotations
@Override
withAllback to summary
public MutableIntList withAll(IntIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.withAll.

Annotations
@Override
withoutback to summary
public MutableIntList without(int element)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.without.

Annotations
@Override
withoutAllback to summary
public MutableIntList withoutAll(IntIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.withoutAll.

Annotations
@Override
zipback to summary
public default <T> MutableList<IntObjectPair<T>> zip(Iterable<T> list)

Overrides default org.eclipse.collections.api.list.primitive.IntList.zip.

Returns a MutableList formed from this MutableIntList and a ListIterable by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.

Since
9.1.
zipIntback to summary
public default MutableList<IntIntPair> zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.IntList.zipInt.

Returns a MutableList formed from this MutableIntList and another IntList by combining corresponding elements in pairs. If one of the two IntLists is longer than the other, its remaining elements are ignored.

Since
9.1.