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

public Interface MutableLongList

extends MutableLongCollection, LongList
Imports
java.util.Comparator, .Random, org.eclipse.collections.api.block.comparator.primitive.LongComparator, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.block.function.primitive.LongIntToObjectFunction, .LongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.LongIntPredicate, .LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongProcedure, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.LongLongPair, .LongObjectPair

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, long... source)

public boolean
addAllAtIndex(int index, LongIterable source)

public void
addAtIndex(int index, long element)

public MutableLongList
public MutableLongList
public MutableList<Long>
public <V> MutableList<V>
collect(LongToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect, org.eclipse.collections.api.list.primitive.LongList.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(LongIntToObjectFunction<? extends V> function)

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

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

public MutableLongList
public default MutableLongList
newEmpty()

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

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

public MutableLongList
reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject, org.eclipse.collections.api.list.primitive.LongList.reject.

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

public default MutableLongList
rejectWithIndex(LongIntPredicate predicate)

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

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

public long
removeAtIndex(int index)

public MutableLongList
public MutableLongList
select(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.select, org.eclipse.collections.api.list.primitive.LongList.select.

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

public default MutableLongList
selectWithIndex(LongIntPredicate predicate)

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

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

public long
set(int index, long element)

public default MutableLongList
shuffleThis()

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

public default MutableLongList
shuffleThis(Random rnd)

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

public MutableLongList
sortThis()

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

public default MutableLongList
sortThis(LongComparator comparator)

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

public default <T> MutableLongList
sortThisBy(LongToObjectFunction<T> function)

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

public default <T> MutableLongList
sortThisBy(LongToObjectFunction<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 MutableLongList
public default void
swap(int index1, int index2)

public default MutableLongList
public ImmutableLongList
public MutableLongList
public MutableLongList
public MutableLongList
public MutableLongList
public MutableLongList
public default <T> MutableList<LongObjectPair<T>>
zip(Iterable<T> list)

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

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

public default MutableList<LongLongPair>
zipLong(LongIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.LongList.zipLong.

Returns a MutableList formed from this MutableLongList and another LongList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.api.collection.primitive.MutableLongCollection:
addaddAlladdAllclearlongIteratorremoveremoveAllremoveAllremoveIfretainAllretainAll
Inherited from org.eclipse.collections.api.list.primitive.LongList:
binarySearchdotProductequalsforEachInBothgethashCodelastIndexOfprimitiveParallelStreamprimitiveStreamspliterator

Method Detail

addAllAtIndexback to summary
public boolean addAllAtIndex(int index, long... source)
addAllAtIndexback to summary
public boolean addAllAtIndex(int index, LongIterable source)
addAtIndexback to summary
public void addAtIndex(int index, long element)
asSynchronizedback to summary
public MutableLongList asSynchronized()

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

Annotations
@Override
asUnmodifiableback to summary
public MutableLongList asUnmodifiable()

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

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect, org.eclipse.collections.api.list.primitive.LongList.collect.

Doc from org.eclipse.collections.api.LongIterable.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(LongIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.LongList.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 MutableLongList distinct()

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

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

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

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

Since
9.2.
rejectback to summary
public MutableLongList reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject, org.eclipse.collections.api.list.primitive.LongList.reject.

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

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

Annotations
@Override
rejectWithIndexback to summary
public default MutableLongList rejectWithIndex(LongIntPredicate predicate)

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

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

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.select, org.eclipse.collections.api.list.primitive.LongList.select.

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

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

Annotations
@Override
selectWithIndexback to summary
public default MutableLongList selectWithIndex(LongIntPredicate predicate)

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

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

Annotations
@Override
Since
11.1.
setback to summary
public long set(int index, long element)
shuffleThisback to summary
public default MutableLongList 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 MutableLongList 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 MutableLongList sortThis()

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

sortThisback to summary
public default MutableLongList sortThis(LongComparator comparator)

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

sortThisByback to summary
public default <T> MutableLongList sortThisBy(LongToObjectFunction<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> MutableLongList sortThisBy(LongToObjectFunction<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 MutableLongList subList(int fromIndex, int toIndex)

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

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

Overrides default org.eclipse.collections.api.collection.primitive.MutableLongCollection.tap, org.eclipse.collections.api.list.primitive.LongList.tap.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.toImmutable, org.eclipse.collections.api.list.primitive.LongList.toImmutable.

Returns an immutable copy of this list.

Annotations
@Override
toReversedback to summary
public MutableLongList toReversed()

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

Annotations
@Override
withback to summary
public MutableLongList with(long element)

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

Annotations
@Override
withAllback to summary
public MutableLongList withAll(LongIterable elements)

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

Annotations
@Override
withoutback to summary
public MutableLongList without(long element)

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

Annotations
@Override
withoutAllback to summary
public MutableLongList withoutAll(LongIterable elements)

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

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

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

Returns a MutableList formed from this MutableLongList 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.
zipLongback to summary
public default MutableList<LongLongPair> zipLong(LongIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.LongList.zipLong.

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

Since
9.1.