Class UnmodifiableShortList
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection
org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableShortList
- All Implemented Interfaces:
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
-
Constructor Summary
Constructors Constructor Description UnmodifiableShortList(MutableShortList list)
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, short... source)
boolean
addAllAtIndex(int index, ShortIterable source)
void
addAtIndex(int index, short element)
LazyShortIterable
asReversed()
MutableShortList
asSynchronized()
MutableShortList
asUnmodifiable()
int
binarySearch(short value)
<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 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.MutableShortList
distinct()
long
dotProduct(ShortList list)
boolean
equals(Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(ShortIntProcedure procedure)
short
get(int index)
short
getFirst()
short
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(short value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(short value)
MutableShortList
newEmpty()
Creates a new empty mutable version of the same List type.MutableShortList
reject(ShortPredicate predicate)
Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.short
removeAtIndex(int index)
MutableShortList
reverseThis()
MutableShortList
select(ShortPredicate predicate)
Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.short
set(int index, short element)
MutableShortList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).MutableShortList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).MutableShortList
subList(int fromIndex, int toIndex)
ImmutableShortList
toImmutable()
Returns an immutable copy of this list.MutableShortList
toReversed()
UnmodifiableShortList
with(short element)
UnmodifiableShortList
withAll(ShortIterable elements)
UnmodifiableShortList
without(short element)
UnmodifiableShortList
withoutAll(ShortIterable elements)
<T> MutableList<ShortObjectPair<T>>
zip(Iterable<T> iterable)
Returns aMutableList
formed from thisMutableShortList
and aListIterable
by combining corresponding elements in pairs.MutableList<ShortShortPair>
zipShort(ShortIterable iterable)
Returns aMutableList
formed from thisMutableShortList
and anotherShortList
by 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, count, detectIfNone, each, forEach, 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 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, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
-
Constructor Details
-
Method Details
-
get
public short get(int index) -
getFirst
public short getFirst()- Specified by:
getFirst
in interfaceOrderedShortIterable
-
getLast
public short getLast()- Specified by:
getLast
in interfaceReversibleShortIterable
-
indexOf
public int indexOf(short value)- Specified by:
indexOf
in interfaceOrderedShortIterable
-
lastIndexOf
public int lastIndexOf(short value)- Specified by:
lastIndexOf
in interfaceShortList
-
addAtIndex
public void addAtIndex(int index, short element)- Specified by:
addAtIndex
in interfaceMutableShortList
-
addAllAtIndex
public boolean addAllAtIndex(int index, short... source)- Specified by:
addAllAtIndex
in interfaceMutableShortList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableShortList
-
removeAtIndex
public short removeAtIndex(int index)- Specified by:
removeAtIndex
in interfaceMutableShortList
-
set
public short set(int index, short element)- Specified by:
set
in interfaceMutableShortList
-
with
- Specified by:
with
in interfaceMutableShortCollection
- Specified by:
with
in interfaceMutableShortList
- Overrides:
with
in classAbstractUnmodifiableShortCollection
-
without
- Specified by:
without
in interfaceMutableShortCollection
- Specified by:
without
in interfaceMutableShortList
- Overrides:
without
in classAbstractUnmodifiableShortCollection
-
withAll
- Specified by:
withAll
in interfaceMutableShortCollection
- Specified by:
withAll
in interfaceMutableShortList
- Overrides:
withAll
in classAbstractUnmodifiableShortCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableShortCollection
- Specified by:
withoutAll
in interfaceMutableShortList
- Overrides:
withoutAll
in classAbstractUnmodifiableShortCollection
-
select
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
select
in interfaceMutableShortCollection
- Specified by:
select
in interfaceMutableShortList
- Specified by:
select
in interfaceOrderedShortIterable
- Specified by:
select
in interfaceReversibleShortIterable
- Specified by:
select
in interfaceShortIterable
- Specified by:
select
in interfaceShortList
- Overrides:
select
in classAbstractUnmodifiableShortCollection
-
reject
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
reject
in interfaceMutableShortCollection
- Specified by:
reject
in interfaceMutableShortList
- Specified by:
reject
in interfaceOrderedShortIterable
- Specified by:
reject
in interfaceReversibleShortIterable
- Specified by:
reject
in interfaceShortIterable
- Specified by:
reject
in interfaceShortList
- Overrides:
reject
in classAbstractUnmodifiableShortCollection
-
collect
Description copied from interface:ShortIterable
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.- Specified by:
collect
in interfaceMutableShortCollection
- Specified by:
collect
in interfaceMutableShortList
- Specified by:
collect
in interfaceOrderedShortIterable
- Specified by:
collect
in interfaceReversibleShortIterable
- Specified by:
collect
in interfaceShortIterable
- Specified by:
collect
in interfaceShortList
- Overrides:
collect
in classAbstractUnmodifiableShortCollection
-
sortThis
Description copied from interface:MutableShortList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableShortList
-
shuffleThis
Description copied from interface:MutableShortList
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.- Specified by:
shuffleThis
in interfaceMutableShortList
-
binarySearch
public int binarySearch(short value)- Specified by:
binarySearch
in interfaceShortList
-
dotProduct
- Specified by:
dotProduct
in interfaceShortList
-
equals
Description copied from interface:ShortList
Follows the same general contract asList.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:ShortList
Follows the same general contract asList.hashCode()
. -
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableShortCollection
- Specified by:
asUnmodifiable
in interfaceMutableShortList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableShortCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableShortCollection
- Specified by:
asSynchronized
in interfaceMutableShortList
- Overrides:
asSynchronized
in classAbstractUnmodifiableShortCollection
-
toImmutable
Description copied from interface:MutableShortList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceMutableShortCollection
- Specified by:
toImmutable
in interfaceMutableShortList
- Specified by:
toImmutable
in interfaceShortList
- Overrides:
toImmutable
in classAbstractUnmodifiableShortCollection
-
newEmpty
Description copied from interface:MutableShortList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableShortCollection
- Specified by:
newEmpty
in interfaceMutableShortList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableShortList
-
toReversed
- Specified by:
toReversed
in interfaceMutableShortList
- Specified by:
toReversed
in interfaceReversibleShortIterable
- Specified by:
toReversed
in interfaceShortList
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedShortIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleShortIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndex
in interfaceOrderedShortIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleShortIterable
-
distinct
- Specified by:
distinct
in interfaceMutableShortList
- Specified by:
distinct
in interfaceReversibleShortIterable
- Specified by:
distinct
in interfaceShortList
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceMutableShortList
- Specified by:
subList
in interfaceShortList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipShort
Description copied from interface:MutableShortList
Returns aMutableList
formed from thisMutableShortList
and anotherShortList
by combining corresponding elements in pairs. If one of the twoShortList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipShort
in interfaceMutableShortList
- Specified by:
zipShort
in interfaceShortList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableShortList
Returns aMutableList
formed from thisMutableShortList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zip
in interfaceMutableShortList
- Specified by:
zip
in interfaceShortList
- Since:
- 9.1.
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceMutableShortList
- Specified by:
collectWithIndex
in interfaceOrderedShortIterable
- Specified by:
collectWithIndex
in interfaceReversibleShortIterable
- Specified by:
collectWithIndex
in interfaceShortList
- Since:
- 9.1.
-
collectWithIndex
public <V, R extends 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:
collectWithIndex
in interfaceOrderedShortIterable
- Since:
- 9.1.
-