Interface MutableIntList
-
- All Superinterfaces:
IntIterable,IntList,MutableIntCollection,OrderedIntIterable,PrimitiveIterable,ReversibleIntIterable
public interface MutableIntList extends MutableIntCollection, IntList
This file was automatically generated from template file mutablePrimitiveList.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaddAllAtIndex(int index, int... source)booleanaddAllAtIndex(int index, IntIterable source)voidaddAtIndex(int index, int element)MutableIntListasSynchronized()MutableIntListasUnmodifiable()MutableList<Integer>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.MutableIntListdistinct()default MutableIntListnewEmpty()Creates a new empty mutable version of the same List type.MutableIntListreject(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)MutableIntListreverseThis()MutableIntListselect(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 MutableIntListshuffleThis()Randomly 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).MutableIntListsortThis()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.MutableIntListsubList(int fromIndex, int toIndex)default voidswap(int index1, int index2)default MutableIntListtap(IntProcedure procedure)ImmutableIntListtoImmutable()Returns an immutable copy of this list.MutableIntListtoReversed()MutableIntListwith(int element)MutableIntListwithAll(IntIterable elements)MutableIntListwithout(int element)MutableIntListwithoutAll(IntIterable elements)default <T> MutableList<IntObjectPair<T>>zip(Iterable<T> list)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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.IntList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf, primitiveParallelStream, primitiveStream, spliterator
-
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.ordered.primitive.OrderedIntIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex
-
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.ordered.primitive.ReversibleIntIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
addAtIndex
void addAtIndex(int index, int element)
-
addAllAtIndex
boolean addAllAtIndex(int index, int... source)
-
addAllAtIndex
boolean addAllAtIndex(int index, IntIterable source)
-
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
MutableIntList select(IntPredicate predicate)
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
MutableIntList reject(IntPredicate predicate)
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
MutableIntList with(int element)
- Specified by:
within interfaceMutableIntCollection
-
without
MutableIntList without(int element)
- Specified by:
withoutin interfaceMutableIntCollection
-
withAll
MutableIntList withAll(IntIterable elements)
- Specified by:
withAllin interfaceMutableIntCollection
-
withoutAll
MutableIntList withoutAll(IntIterable elements)
- Specified by:
withoutAllin interfaceMutableIntCollection
-
tap
default MutableIntList tap(IntProcedure procedure)
- Specified by:
tapin interfaceIntIterable- Specified by:
tapin interfaceIntList- Specified by:
tapin interfaceMutableIntCollection- Since:
- 9.0.
-
selectWithIndex
default MutableIntList selectWithIndex(IntIntPredicate predicate)
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
default MutableIntList rejectWithIndex(IntIntPredicate predicate)
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
<V> MutableList<V> collect(IntToObjectFunction<? extends V> function)
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
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.- 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
default MutableIntList sortThis(IntComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.
-
sortThisBy
default <T> MutableIntList sortThisBy(IntToObjectFunction<T> function)
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
default MutableIntList shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.
-
shuffleThis
default MutableIntList shuffleThis(Random rnd)
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
MutableIntList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceIntList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipInt
default MutableList<IntIntPair> zipInt(IntIterable iterable)
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
default <T> MutableList<IntObjectPair<T>> zip(Iterable<T> list)
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
default MutableIntList newEmpty()
Creates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableIntCollection- Since:
- 9.2.
-
-