Interface MutableIntList
- All Superinterfaces:
IntIterable,IntList,MutableIntCollection,OrderedIntIterable,PrimitiveIterable,ReversibleIntIterable
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllAtIndex(int index, int... source) booleanaddAllAtIndex(int index, IntIterable source) voidaddAtIndex(int index, int element) boxed()<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.default <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.distinct()default MutableIntListnewEmpty()Creates a new empty mutable version of the same List type.reject(IntPredicate predicate) Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.default MutableIntListrejectWithIndex(IntIntPredicate predicate) Returns a new MutableIntList excluding all elements with corresponding indexes matching the specified predicate.intremoveAtIndex(int index) select(IntPredicate predicate) Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.default MutableIntListselectWithIndex(IntIntPredicate predicate) Returns a new MutableIntList including all elements with corresponding indexes matching the specified predicate.intset(int index, int element) default MutableIntListRandomly permutes this list mutating its contents and returns the same list (this).default MutableIntListshuffleThis(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 MutableIntListsortThis(IntComparator comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableIntListsortThisBy(IntToObjectFunction<T> function) Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableIntListsortThisBy(IntToObjectFunction<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 MutableIntListtap(IntProcedure procedure) Returns an immutable copy of this list.with(int element) withAll(IntIterable elements) without(int element) withoutAll(IntIterable elements) default <T> MutableList<IntObjectPair<T>>Returns aMutableListformed from thisMutableIntListand aListIterableby combining corresponding elements in pairs.default MutableList<IntIntPair>zipInt(IntIterable iterable) Returns aMutableListformed from thisMutableIntListand anotherIntListby combining corresponding elements in pairs.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, 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.IntList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf, primitiveParallelStream, primitiveStream, spliteratorMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex, toStackMethods 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.ReversibleIntIterable
asReversed, getLast, injectIntoWithIndex
-
Method Details
-
addAtIndex
void addAtIndex(int index, int element) -
addAllAtIndex
boolean addAllAtIndex(int index, int... source) -
addAllAtIndex
-
removeAtIndex
int removeAtIndex(int index) -
set
int set(int index, int element) -
boxed
MutableList<Integer> boxed() -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:IntIterableReturns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntList- Specified by:
selectin interfaceMutableIntCollection- Specified by:
selectin interfaceOrderedIntIterable- Specified by:
selectin interfaceReversibleIntIterable
-
reject
Description copied from interface:IntIterableReturns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntList- Specified by:
rejectin interfaceMutableIntCollection- Specified by:
rejectin interfaceOrderedIntIterable- Specified by:
rejectin interfaceReversibleIntIterable
-
with
- Specified by:
within interfaceMutableIntCollection
-
without
- Specified by:
withoutin interfaceMutableIntCollection
-
withAll
- Specified by:
withAllin interfaceMutableIntCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableIntCollection
-
tap
- Specified by:
tapin interfaceIntIterable- Specified by:
tapin interfaceIntList- Specified by:
tapin interfaceMutableIntCollection- Since:
- 9.0.
-
selectWithIndex
Returns a new MutableIntList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceIntList- Specified by:
selectWithIndexin interfaceOrderedIntIterable- Specified by:
selectWithIndexin interfaceReversibleIntIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableIntList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceIntList- Specified by:
rejectWithIndexin interfaceOrderedIntIterable- Specified by:
rejectWithIndexin interfaceReversibleIntIterable- Since:
- 11.1.
-
collect
Description copied from interface:IntIterableReturns 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 interfaceIntIterable- Specified by:
collectin interfaceIntList- Specified by:
collectin interfaceMutableIntCollection- Specified by:
collectin interfaceOrderedIntIterable- Specified by:
collectin interfaceReversibleIntIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceIntList- Specified by:
collectWithIndexin interfaceOrderedIntIterable- Specified by:
collectWithIndexin interfaceReversibleIntIterable- Since:
- 9.1.
-
reverseThis
MutableIntList reverseThis() -
toReversed
MutableIntList toReversed()- Specified by:
toReversedin interfaceIntList- Specified by:
toReversedin interfaceReversibleIntIterable
-
distinct
MutableIntList distinct()- Specified by:
distinctin interfaceIntList- Specified by:
distinctin interfaceReversibleIntIterable- Since:
- 6.0.
-
sortThis
MutableIntList 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> MutableIntList sortThisBy(IntToObjectFunction<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
MutableIntList asUnmodifiable()- Specified by:
asUnmodifiablein interfaceMutableIntCollection
-
asSynchronized
MutableIntList asSynchronized()- Specified by:
asSynchronizedin interfaceMutableIntCollection
-
toImmutable
ImmutableIntList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceIntList- Specified by:
toImmutablein interfaceMutableIntCollection
-
subList
-
zipInt
Returns aMutableListformed from thisMutableIntListand anotherIntListby combining corresponding elements in pairs. If one of the twoIntLists is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableListformed from thisMutableIntListand 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 interfaceMutableIntCollection- Since:
- 9.2.
-