Class UnmodifiableIntList
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableIntList
- All Implemented Interfaces:
Serializable
,MutableIntCollection
,IntIterable
,IntList
,MutableIntList
,OrderedIntIterable
,ReversibleIntIterable
,PrimitiveIterable
public class UnmodifiableIntList extends AbstractUnmodifiableIntCollection implements MutableIntList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.
- Since:
- 3.1.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UnmodifiableIntList(MutableIntList list)
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, int... source)
boolean
addAllAtIndex(int index, IntIterable source)
void
addAtIndex(int index, int element)
LazyIntIterable
asReversed()
MutableIntList
asSynchronized()
MutableIntList
asUnmodifiable()
int
binarySearch(int value)
<V> MutableList<V>
collect(IntToObjectFunction<? 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(IntIntToObjectFunction<? 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(IntIntToObjectFunction<? 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.MutableIntList
distinct()
long
dotProduct(IntList list)
boolean
equals(Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(IntIntProcedure procedure)
int
get(int index)
int
getFirst()
int
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(int value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(int value)
MutableIntList
newEmpty()
Creates a new empty mutable version of the same List type.MutableIntList
reject(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.int
removeAtIndex(int index)
MutableIntList
reverseThis()
MutableIntList
select(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.int
set(int index, int element)
MutableIntList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).MutableIntList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).Spliterator.OfInt
spliterator()
MutableIntList
subList(int fromIndex, int toIndex)
ImmutableIntList
toImmutable()
Returns an immutable copy of this list.MutableIntList
toReversed()
UnmodifiableIntList
with(int element)
UnmodifiableIntList
withAll(IntIterable elements)
UnmodifiableIntList
without(int element)
UnmodifiableIntList
withoutAll(IntIterable elements)
<T> MutableList<IntObjectPair<T>>
zip(Iterable<T> iterable)
Returns aMutableList
formed from thisMutableIntList
and aListIterable
by combining corresponding elements in pairs.MutableList<IntIntPair>
zipInt(IntIterable iterable)
Returns aMutableList
formed from thisMutableIntList
and anotherIntList
by combining corresponding elements in pairs.Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, intIterator, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from interface org.eclipse.collections.api.IntIterable
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
Methods inherited from interface org.eclipse.collections.api.list.primitive.IntList
primitiveParallelStream, primitiveStream
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableIntList
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
-
Constructor Details
-
Method Details
-
get
public int get(int index) -
getFirst
public int getFirst()- Specified by:
getFirst
in interfaceOrderedIntIterable
-
getLast
public int getLast()- Specified by:
getLast
in interfaceReversibleIntIterable
-
indexOf
public int indexOf(int value)- Specified by:
indexOf
in interfaceOrderedIntIterable
-
lastIndexOf
public int lastIndexOf(int value)- Specified by:
lastIndexOf
in interfaceIntList
-
addAtIndex
public void addAtIndex(int index, int element)- Specified by:
addAtIndex
in interfaceMutableIntList
-
addAllAtIndex
public boolean addAllAtIndex(int index, int... source)- Specified by:
addAllAtIndex
in interfaceMutableIntList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableIntList
-
removeAtIndex
public int removeAtIndex(int index)- Specified by:
removeAtIndex
in interfaceMutableIntList
-
set
public int set(int index, int element)- Specified by:
set
in interfaceMutableIntList
-
with
- Specified by:
with
in interfaceMutableIntCollection
- Specified by:
with
in interfaceMutableIntList
- Overrides:
with
in classAbstractUnmodifiableIntCollection
-
without
- Specified by:
without
in interfaceMutableIntCollection
- Specified by:
without
in interfaceMutableIntList
- Overrides:
without
in classAbstractUnmodifiableIntCollection
-
withAll
- Specified by:
withAll
in interfaceMutableIntCollection
- Specified by:
withAll
in interfaceMutableIntList
- Overrides:
withAll
in classAbstractUnmodifiableIntCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableIntCollection
- Specified by:
withoutAll
in interfaceMutableIntList
- Overrides:
withoutAll
in classAbstractUnmodifiableIntCollection
-
select
Description copied from interface:IntIterable
Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntList
- Specified by:
select
in interfaceMutableIntCollection
- Specified by:
select
in interfaceMutableIntList
- Specified by:
select
in interfaceOrderedIntIterable
- Specified by:
select
in interfaceReversibleIntIterable
- Overrides:
select
in classAbstractUnmodifiableIntCollection
-
reject
Description copied from interface:IntIterable
Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntList
- Specified by:
reject
in interfaceMutableIntCollection
- Specified by:
reject
in interfaceMutableIntList
- Specified by:
reject
in interfaceOrderedIntIterable
- Specified by:
reject
in interfaceReversibleIntIterable
- Overrides:
reject
in classAbstractUnmodifiableIntCollection
-
collect
Description copied from interface:IntIterable
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 interfaceIntIterable
- Specified by:
collect
in interfaceIntList
- Specified by:
collect
in interfaceMutableIntCollection
- Specified by:
collect
in interfaceMutableIntList
- Specified by:
collect
in interfaceOrderedIntIterable
- Specified by:
collect
in interfaceReversibleIntIterable
- Overrides:
collect
in classAbstractUnmodifiableIntCollection
-
sortThis
Description copied from interface:MutableIntList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableIntList
-
shuffleThis
Description copied from interface:MutableIntList
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 interfaceMutableIntList
-
binarySearch
public int binarySearch(int value)- Specified by:
binarySearch
in interfaceIntList
-
dotProduct
- Specified by:
dotProduct
in interfaceIntList
-
equals
Description copied from interface:IntList
Follows the same general contract asList.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:IntList
Follows the same general contract asList.hashCode()
. -
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableIntCollection
- Specified by:
asUnmodifiable
in interfaceMutableIntList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableIntCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableIntCollection
- Specified by:
asSynchronized
in interfaceMutableIntList
- Overrides:
asSynchronized
in classAbstractUnmodifiableIntCollection
-
toImmutable
Description copied from interface:MutableIntList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceIntList
- Specified by:
toImmutable
in interfaceMutableIntCollection
- Specified by:
toImmutable
in interfaceMutableIntList
- Overrides:
toImmutable
in classAbstractUnmodifiableIntCollection
-
newEmpty
Description copied from interface:MutableIntList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableIntCollection
- Specified by:
newEmpty
in interfaceMutableIntList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableIntList
-
toReversed
- Specified by:
toReversed
in interfaceIntList
- Specified by:
toReversed
in interfaceMutableIntList
- Specified by:
toReversed
in interfaceReversibleIntIterable
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedIntIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleIntIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndex
in interfaceOrderedIntIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleIntIterable
-
distinct
- Specified by:
distinct
in interfaceIntList
- Specified by:
distinct
in interfaceMutableIntList
- Specified by:
distinct
in interfaceReversibleIntIterable
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceIntList
- Specified by:
subList
in interfaceMutableIntList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipInt
Description copied from interface:MutableIntList
Returns aMutableList
formed from thisMutableIntList
and anotherIntList
by combining corresponding elements in pairs. If one of the twoIntList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipInt
in interfaceIntList
- Specified by:
zipInt
in interfaceMutableIntList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableIntList
Returns aMutableList
formed from thisMutableIntList
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 interfaceIntList
- Specified by:
zip
in interfaceMutableIntList
- 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 interfaceIntList
- Specified by:
collectWithIndex
in interfaceMutableIntList
- Specified by:
collectWithIndex
in interfaceOrderedIntIterable
- Specified by:
collectWithIndex
in interfaceReversibleIntIterable
- Since:
- 9.1.
-
collectWithIndex
public <V, R extends Collection<V>> R collectWithIndex(IntIntToObjectFunction<? 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 interfaceOrderedIntIterable
- Since:
- 9.1.
-
spliterator
- Specified by:
spliterator
in interfaceIntList
-