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

public Interface MutableShortList

extends MutableShortCollection, ShortList
Imports
java.util.Comparator, .Random, org.eclipse.collections.api.block.comparator.primitive.ShortComparator, org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.block.function.primitive.ShortIntToObjectFunction, .ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ShortIntPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, org.eclipse.collections.api.collection.primitive.MutableShortCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.ShortShortPair, .ShortObjectPair

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

public boolean
addAllAtIndex(int index, ShortIterable source)

public void
addAtIndex(int index, short element)

public MutableShortList
public MutableShortList
public MutableList<Short>
public <V> MutableList<V>
collect(ShortToObjectFunction<? extends V> function)

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

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

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

public MutableShortList
public default MutableShortList
newEmpty()

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

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

public MutableShortList
reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.reject, org.eclipse.collections.api.list.primitive.ShortList.reject.

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

public default MutableShortList
rejectWithIndex(ShortIntPredicate predicate)

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

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

public short
removeAtIndex(int index)

public MutableShortList
public MutableShortList
select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.select, org.eclipse.collections.api.list.primitive.ShortList.select.

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

public default MutableShortList
selectWithIndex(ShortIntPredicate predicate)

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

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

public short
set(int index, short element)

public default MutableShortList
shuffleThis()

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

public default MutableShortList
shuffleThis(Random rnd)

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

public MutableShortList
sortThis()

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

public default MutableShortList
sortThis(ShortComparator comparator)

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

public default <T> MutableShortList
sortThisBy(ShortToObjectFunction<T> function)

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

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

public default MutableShortList
public ImmutableShortList
public MutableShortList
public MutableShortList
public MutableShortList
public MutableShortList
public MutableShortList
public default <T> MutableList<ShortObjectPair<T>>
zip(Iterable<T> list)

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

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

public default MutableList<ShortShortPair>
zipShort(ShortIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.ShortList.zipShort.

Returns a MutableList formed from this MutableShortList and another ShortList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.api.collection.primitive.MutableShortCollection:
addaddAlladdAllclearremoveremoveAllremoveAllremoveIfretainAllretainAllshortIterator
Inherited from org.eclipse.collections.api.list.primitive.ShortList:
binarySearchdotProductequalsforEachInBothgethashCodelastIndexOf

Method Detail

addAllAtIndexback to summary
public boolean addAllAtIndex(int index, short... source)
addAllAtIndexback to summary
public boolean addAllAtIndex(int index, ShortIterable source)
addAtIndexback to summary
public void addAtIndex(int index, short element)
asSynchronizedback to summary
public MutableShortList asSynchronized()

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

Annotations
@Override
asUnmodifiableback to summary
public MutableShortList asUnmodifiable()

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

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.collect, org.eclipse.collections.api.list.primitive.ShortList.collect.

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

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

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

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

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

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

Since
9.2.
rejectback to summary
public MutableShortList reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.reject, org.eclipse.collections.api.list.primitive.ShortList.reject.

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

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

Annotations
@Override
rejectWithIndexback to summary
public default MutableShortList rejectWithIndex(ShortIntPredicate predicate)

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

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

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.select, org.eclipse.collections.api.list.primitive.ShortList.select.

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

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

Annotations
@Override
selectWithIndexback to summary
public default MutableShortList selectWithIndex(ShortIntPredicate predicate)

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

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

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

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

sortThisback to summary
public default MutableShortList sortThis(ShortComparator comparator)

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

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

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

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

Overrides default org.eclipse.collections.api.collection.primitive.MutableShortCollection.tap, org.eclipse.collections.api.list.primitive.ShortList.tap.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableShortCollection.toImmutable, org.eclipse.collections.api.list.primitive.ShortList.toImmutable.

Returns an immutable copy of this list.

Annotations
@Override
toReversedback to summary
public MutableShortList toReversed()

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

Annotations
@Override
withback to summary
public MutableShortList with(short element)

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

Annotations
@Override
withAllback to summary
public MutableShortList withAll(ShortIterable elements)

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

Annotations
@Override
withoutback to summary
public MutableShortList without(short element)

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

Annotations
@Override
withoutAllback to summary
public MutableShortList withoutAll(ShortIterable elements)

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

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

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

Returns a MutableList formed from this MutableShortList 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.
zipShortback to summary
public default MutableList<ShortShortPair> zipShort(ShortIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.ShortList.zipShort.

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

Since
9.1.