Class UnmodifiableShortList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableShortList
-
- All Implemented Interfaces:
java.io.Serializable,MutableShortCollection,MutableShortList,ShortList,OrderedShortIterable,ReversibleShortIterable,PrimitiveIterable,ShortIterable
public class UnmodifiableShortList extends AbstractUnmodifiableShortCollection implements MutableShortList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description UnmodifiableShortList(MutableShortList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllAtIndex(int index, short... source)booleanaddAllAtIndex(int index, ShortIterable source)voidaddAtIndex(int index, short element)LazyShortIterableasReversed()MutableShortListasSynchronized()MutableShortListasUnmodifiable()intbinarySearch(short value)MutableList<java.lang.Short>boxed()<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.<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.<V,R extends java.util.Collection<V>>
RcollectWithIndex(ShortIntToObjectFunction<? extends V> function, R target)Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.MutableShortListdistinct()longdotProduct(ShortList list)booleanequals(java.lang.Object otherList)Follows the same general contract asList.equals(Object).voidforEachWithIndex(ShortIntProcedure procedure)shortget(int index)shortgetFirst()shortgetLast()private MutableShortListgetMutableShortList()inthashCode()Follows the same general contract asList.hashCode().intindexOf(short value)<T> TinjectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(short value)MutableShortListnewEmpty()Creates a new empty mutable version of the same List type.MutableShortListreject(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.MutableShortListrejectWithIndex(ShortIntPredicate predicate)Returns a new MutableShortList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableShortCollection>
RrejectWithIndex(ShortIntPredicate predicate, R target)Returns a new MutableShortCollection excluding all elements with corresponding indexes matching the specified predicate.shortremoveAtIndex(int index)MutableShortListreverseThis()MutableShortListselect(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.MutableShortListselectWithIndex(ShortIntPredicate predicate)Returns a new MutableShortList including all elements with corresponding indexes matching the specified predicate.<R extends MutableShortCollection>
RselectWithIndex(ShortIntPredicate predicate, R target)Returns a new MutableShortCollection including all elements with corresponding indexes matching the specified predicate.shortset(int index, short element)MutableShortListshuffleThis()Randomly permutes this list mutating its contents and returns the same list (this).MutableShortListsortThis()Sorts this list mutating its contents and returns the same mutable list (this).MutableShortListsubList(int fromIndex, int toIndex)ImmutableShortListtoImmutable()Returns an immutable copy of this list.MutableShortListtoReversed()MutableShortStacktoStack()Converts the collection to a ShortStack.UnmodifiableShortListwith(short element)UnmodifiableShortListwithAll(ShortIterable elements)UnmodifiableShortListwithout(short element)UnmodifiableShortListwithoutAll(ShortIterable elements)<T> MutableList<ShortObjectPair<T>>zip(java.lang.Iterable<T> iterable)Returns aMutableListformed from thisMutableShortListand aListIterableby combining corresponding elements in pairs.MutableList<ShortShortPair>zipShort(ShortIterable iterable)Returns aMutableListformed from thisMutableShortListand anotherShortListby combining corresponding elements in pairs.-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getShortCollection, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIterator, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableShortCollection
add, addAll, addAll, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIterator
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableShortList
shuffleThis, sortThis, sortThisBy, sortThisBy, swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.ShortList
forEachInBoth
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableShortList
public UnmodifiableShortList(MutableShortList list)
-
-
Method Detail
-
getMutableShortList
private MutableShortList getMutableShortList()
-
getFirst
public short getFirst()
- Specified by:
getFirstin interfaceOrderedShortIterable
-
getLast
public short getLast()
- Specified by:
getLastin interfaceReversibleShortIterable
-
indexOf
public int indexOf(short value)
- Specified by:
indexOfin interfaceOrderedShortIterable
-
lastIndexOf
public int lastIndexOf(short value)
- Specified by:
lastIndexOfin interfaceShortList
-
boxed
public MutableList<java.lang.Short> boxed()
- Specified by:
boxedin interfaceMutableShortList
-
addAtIndex
public void addAtIndex(int index, short element)- Specified by:
addAtIndexin interfaceMutableShortList
-
addAllAtIndex
public boolean addAllAtIndex(int index, short... source)- Specified by:
addAllAtIndexin interfaceMutableShortList
-
addAllAtIndex
public boolean addAllAtIndex(int index, ShortIterable source)- Specified by:
addAllAtIndexin interfaceMutableShortList
-
removeAtIndex
public short removeAtIndex(int index)
- Specified by:
removeAtIndexin interfaceMutableShortList
-
set
public short set(int index, short element)- Specified by:
setin interfaceMutableShortList
-
with
public UnmodifiableShortList with(short element)
- Specified by:
within interfaceMutableShortCollection- Specified by:
within interfaceMutableShortList- Overrides:
within classAbstractUnmodifiableShortCollection
-
without
public UnmodifiableShortList without(short element)
- Specified by:
withoutin interfaceMutableShortCollection- Specified by:
withoutin interfaceMutableShortList- Overrides:
withoutin classAbstractUnmodifiableShortCollection
-
withAll
public UnmodifiableShortList withAll(ShortIterable elements)
- Specified by:
withAllin interfaceMutableShortCollection- Specified by:
withAllin interfaceMutableShortList- Overrides:
withAllin classAbstractUnmodifiableShortCollection
-
withoutAll
public UnmodifiableShortList withoutAll(ShortIterable elements)
- Specified by:
withoutAllin interfaceMutableShortCollection- Specified by:
withoutAllin interfaceMutableShortList- Overrides:
withoutAllin classAbstractUnmodifiableShortCollection
-
select
public MutableShortList select(ShortPredicate predicate)
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 interfaceMutableShortList- Specified by:
selectin interfaceOrderedShortIterable- Specified by:
selectin interfaceReversibleShortIterable- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortList- Overrides:
selectin classAbstractUnmodifiableShortCollection
-
reject
public MutableShortList reject(ShortPredicate predicate)
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 interfaceMutableShortList- Specified by:
rejectin interfaceOrderedShortIterable- Specified by:
rejectin interfaceReversibleShortIterable- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortList- Overrides:
rejectin classAbstractUnmodifiableShortCollection
-
collect
public <V> MutableList<V> collect(ShortToObjectFunction<? extends V> function)
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 interfaceMutableShortList- Specified by:
collectin interfaceOrderedShortIterable- Specified by:
collectin interfaceReversibleShortIterable- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortList- Overrides:
collectin classAbstractUnmodifiableShortCollection
-
sortThis
public MutableShortList sortThis()
Description copied from interface:MutableShortListSorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThisin interfaceMutableShortList
-
shuffleThis
public MutableShortList shuffleThis()
Description copied from interface:MutableShortListRandomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.- Specified by:
shuffleThisin interfaceMutableShortList
-
binarySearch
public int binarySearch(short value)
- Specified by:
binarySearchin interfaceShortList
-
dotProduct
public long dotProduct(ShortList list)
- Specified by:
dotProductin interfaceShortList
-
equals
public boolean equals(java.lang.Object otherList)
Description copied from interface:ShortListFollows the same general contract asList.equals(Object).
-
hashCode
public int hashCode()
Description copied from interface:ShortListFollows the same general contract asList.hashCode().
-
asUnmodifiable
public MutableShortList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortCollection- Specified by:
asUnmodifiablein interfaceMutableShortList- Overrides:
asUnmodifiablein classAbstractUnmodifiableShortCollection
-
asSynchronized
public MutableShortList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortCollection- Specified by:
asSynchronizedin interfaceMutableShortList- Overrides:
asSynchronizedin classAbstractUnmodifiableShortCollection
-
toImmutable
public ImmutableShortList toImmutable()
Description copied from interface:MutableShortListReturns an immutable copy of this list.- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceMutableShortList- Specified by:
toImmutablein interfaceShortList- Overrides:
toImmutablein classAbstractUnmodifiableShortCollection
-
newEmpty
public MutableShortList newEmpty()
Description copied from interface:MutableShortListCreates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableShortCollection- Specified by:
newEmptyin interfaceMutableShortList- Since:
- 9.2.
-
reverseThis
public MutableShortList reverseThis()
- Specified by:
reverseThisin interfaceMutableShortList
-
toReversed
public MutableShortList toReversed()
- Specified by:
toReversedin interfaceMutableShortList- Specified by:
toReversedin interfaceReversibleShortIterable- Specified by:
toReversedin interfaceShortList
-
forEachWithIndex
public void forEachWithIndex(ShortIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedShortIterable
-
asReversed
public LazyShortIterable asReversed()
- Specified by:
asReversedin interfaceReversibleShortIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedShortIterable- Specified by:
injectIntoWithIndexin interfaceReversibleShortIterable
-
distinct
public MutableShortList distinct()
- Specified by:
distinctin interfaceMutableShortList- Specified by:
distinctin interfaceReversibleShortIterable- Specified by:
distinctin interfaceShortList- Since:
- 6.0.
-
subList
public MutableShortList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceMutableShortList- Specified by:
subListin interfaceShortList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipShort
public MutableList<ShortShortPair> zipShort(ShortIterable iterable)
Description copied from interface:MutableShortListReturns aMutableListformed from thisMutableShortListand anotherShortListby combining corresponding elements in pairs. If one of the twoShortLists is longer than the other, its remaining elements are ignored.- Specified by:
zipShortin interfaceMutableShortList- Specified by:
zipShortin interfaceShortList- Since:
- 9.1.
-
zip
public <T> MutableList<ShortObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Description copied from interface:MutableShortListReturns 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.- Specified by:
zipin interfaceMutableShortList- Specified by:
zipin interfaceShortList- Since:
- 9.1.
-
selectWithIndex
public MutableShortList selectWithIndex(ShortIntPredicate predicate)
Returns a new MutableShortList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceMutableShortList- Specified by:
selectWithIndexin interfaceOrderedShortIterable- Specified by:
selectWithIndexin interfaceReversibleShortIterable- Specified by:
selectWithIndexin interfaceShortList- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableShortCollection> R selectWithIndex(ShortIntPredicate predicate, R target)
Returns a new MutableShortCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedShortIterable- Since:
- 11.1.
-
rejectWithIndex
public MutableShortList rejectWithIndex(ShortIntPredicate predicate)
Returns a new MutableShortList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceMutableShortList- Specified by:
rejectWithIndexin interfaceOrderedShortIterable- Specified by:
rejectWithIndexin interfaceReversibleShortIterable- Specified by:
rejectWithIndexin interfaceShortList- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableShortCollection> R rejectWithIndex(ShortIntPredicate predicate, R target)
Returns a new MutableShortCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedShortIterable- Since:
- 11.1.
-
collectWithIndex
public <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.- Specified by:
collectWithIndexin interfaceMutableShortList- Specified by:
collectWithIndexin interfaceOrderedShortIterable- Specified by:
collectWithIndexin interfaceReversibleShortIterable- Specified by:
collectWithIndexin interfaceShortList- Since:
- 9.1.
-
collectWithIndex
public <V,R extends java.util.Collection<V>> R collectWithIndex(ShortIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedShortIterable- Since:
- 9.1.
-
toStack
public MutableShortStack toStack()
Description copied from interface:OrderedShortIterableConverts the collection to a ShortStack.- Specified by:
toStackin interfaceOrderedShortIterable
-
-