Interface MutableShortList
- All Superinterfaces:
MutableShortCollection,OrderedShortIterable,PrimitiveIterable,ReversibleShortIterable,ShortIterable,ShortList
- All Known Implementing Classes:
ShortArrayList,SynchronizedShortList,UnmodifiableShortList
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllAtIndex(int index, short... source) booleanaddAllAtIndex(int index, ShortIterable source) voidaddAtIndex(int index, short element) <V> MutableList<V>collect(ShortToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.default <V> MutableList<V>collectWithIndex(ShortIntToObjectFunction<? extends V> function) Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.distinct()default MutableShortListnewEmpty()Creates a new empty mutable version of the same List type.reject(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.default MutableShortListrejectWithIndex(ShortIntPredicate predicate) Returns a new MutableShortList excluding all elements with corresponding indexes matching the specified predicate.shortremoveAtIndex(int index) select(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.default MutableShortListselectWithIndex(ShortIntPredicate predicate) Returns a new MutableShortList including all elements with corresponding indexes matching the specified predicate.shortset(int index, short element) default MutableShortListRandomly permutes this list mutating its contents and returns the same list (this).default MutableShortListshuffleThis(Random rnd) Randomly permutes this list mutating its contents and returns the same list (this).sortThis()Sorts this list mutating its contents and returns the same mutable list (this).default MutableShortListsortThis(ShortComparator comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableShortListsortThisBy(ShortToObjectFunction<T> function) Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableShortListsortThisBy(ShortToObjectFunction<T> function, Comparator<? super T> comparator) Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.subList(int fromIndex, int toIndex) default voidswap(int index1, int index2) default MutableShortListtap(ShortProcedure procedure) Returns an immutable copy of this list.with(short element) withAll(ShortIterable elements) without(short element) withoutAll(ShortIterable elements) default <T> MutableList<ShortObjectPair<T>>Returns aMutableListformed from thisMutableShortListand aListIterableby combining corresponding elements in pairs.default MutableList<ShortShortPair>zipShort(ShortIterable iterable) Returns aMutableListformed from thisMutableShortListand anotherShortListby combining corresponding elements in pairs.Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableShortCollection
add, addAll, addAll, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIteratorMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedShortIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringMethods inherited from interface org.eclipse.collections.api.ordered.primitive.ReversibleShortIterable
asReversed, getLast, injectIntoWithIndexMethods inherited from interface org.eclipse.collections.api.ShortIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.ShortList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf
-
Method Details
-
addAtIndex
void addAtIndex(int index, short element) -
addAllAtIndex
boolean addAllAtIndex(int index, short... source) -
addAllAtIndex
-
removeAtIndex
short removeAtIndex(int index) -
set
short set(int index, short element) -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
selectin interfaceMutableShortCollection- Specified by:
selectin interfaceOrderedShortIterable- Specified by:
selectin interfaceReversibleShortIterable- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortList
-
reject
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
rejectin interfaceMutableShortCollection- Specified by:
rejectin interfaceOrderedShortIterable- Specified by:
rejectin interfaceReversibleShortIterable- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortList
-
with
- Specified by:
within interfaceMutableShortCollection
-
without
- Specified by:
withoutin interfaceMutableShortCollection
-
withAll
- Specified by:
withAllin interfaceMutableShortCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableShortCollection
-
tap
- Specified by:
tapin interfaceMutableShortCollection- Specified by:
tapin interfaceShortIterable- Specified by:
tapin interfaceShortList- Since:
- 9.0.
-
selectWithIndex
Returns a new MutableShortList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedShortIterable- Specified by:
selectWithIndexin interfaceReversibleShortIterable- Specified by:
selectWithIndexin interfaceShortList- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableShortList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedShortIterable- Specified by:
rejectWithIndexin interfaceReversibleShortIterable- Specified by:
rejectWithIndexin interfaceShortList- Since:
- 11.1.
-
collect
Description copied from interface:ShortIterableReturns 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.- Specified by:
collectin interfaceMutableShortCollection- Specified by:
collectin interfaceOrderedShortIterable- Specified by:
collectin interfaceReversibleShortIterable- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortList
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedShortIterable- Specified by:
collectWithIndexin interfaceReversibleShortIterable- Specified by:
collectWithIndexin interfaceShortList- Since:
- 9.1.
-
reverseThis
MutableShortList reverseThis() -
toReversed
MutableShortList toReversed()- Specified by:
toReversedin interfaceReversibleShortIterable- Specified by:
toReversedin interfaceShortList
-
distinct
MutableShortList distinct()- Specified by:
distinctin interfaceReversibleShortIterable- Specified by:
distinctin interfaceShortList- Since:
- 6.0.
-
sortThis
MutableShortList sortThis()Sorts this list mutating its contents and returns the same mutable list (this). -
sortThis
Sorts the internal data structure of this list and returns the list itself as a convenience. -
sortThisBy
Sorts the internal data structure of this list based on the natural order of the key returned byfunction. -
sortThisBy
default <T> MutableShortList sortThisBy(ShortToObjectFunction<T> function, Comparator<? super T> comparator) Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness. -
shuffleThis
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. -
asUnmodifiable
MutableShortList asUnmodifiable()- Specified by:
asUnmodifiablein interfaceMutableShortCollection
-
asSynchronized
MutableShortList asSynchronized()- Specified by:
asSynchronizedin interfaceMutableShortCollection
-
toImmutable
ImmutableShortList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceShortList
-
subList
-
zipShort
Returns aMutableListformed from thisMutableShortListand anotherShortListby combining corresponding elements in pairs. If one of the twoShortLists is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableListformed from thisMutableShortListand aListIterableby combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored. -
newEmpty
Creates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableShortCollection- Since:
- 9.2.
-