Interface MutableLongList
- All Superinterfaces:
LongIterable,LongList,MutableLongCollection,OrderedLongIterable,PrimitiveIterable,ReversibleLongIterable
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllAtIndex(int index, long... source) booleanaddAllAtIndex(int index, LongIterable source) voidaddAtIndex(int index, long element) boxed()<V> MutableList<V>collect(LongToObjectFunction<? 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(LongIntToObjectFunction<? extends V> function) Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.distinct()default MutableLongListnewEmpty()Creates a new empty mutable version of the same List type.reject(LongPredicate predicate) Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.default MutableLongListrejectWithIndex(LongIntPredicate predicate) Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.longremoveAtIndex(int index) select(LongPredicate predicate) Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.default MutableLongListselectWithIndex(LongIntPredicate predicate) Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.longset(int index, long element) default MutableLongListRandomly permutes this list mutating its contents and returns the same list (this).default MutableLongListshuffleThis(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 MutableLongListsortThis(LongComparator comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableLongListsortThisBy(LongToObjectFunction<T> function) Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableLongListsortThisBy(LongToObjectFunction<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 MutableLongListtap(LongProcedure procedure) Returns an immutable copy of this list.with(long element) withAll(LongIterable elements) without(long element) withoutAll(LongIterable elements) default <T> MutableList<LongObjectPair<T>>Returns aMutableListformed from thisMutableLongListand aListIterableby combining corresponding elements in pairs.default MutableList<LongLongPair>zipLong(LongIterable iterable) Returns aMutableListformed from thisMutableLongListand anotherLongListby combining corresponding elements in pairs.Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf, primitiveParallelStream, primitiveStream, spliteratorMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
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.ReversibleLongIterable
asReversed, getLast, injectIntoWithIndex
-
Method Details
-
addAtIndex
void addAtIndex(int index, long element) -
addAllAtIndex
boolean addAllAtIndex(int index, long... source) -
addAllAtIndex
-
removeAtIndex
long removeAtIndex(int index) -
set
long set(int index, long element) -
boxed
MutableList<Long> boxed() -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongList- Specified by:
selectin interfaceMutableLongCollection- Specified by:
selectin interfaceOrderedLongIterable- Specified by:
selectin interfaceReversibleLongIterable
-
reject
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongList- Specified by:
rejectin interfaceMutableLongCollection- Specified by:
rejectin interfaceOrderedLongIterable- Specified by:
rejectin interfaceReversibleLongIterable
-
with
- Specified by:
within interfaceMutableLongCollection
-
without
- Specified by:
withoutin interfaceMutableLongCollection
-
withAll
- Specified by:
withAllin interfaceMutableLongCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableLongCollection
-
tap
- Specified by:
tapin interfaceLongIterable- Specified by:
tapin interfaceLongList- Specified by:
tapin interfaceMutableLongCollection- Since:
- 9.0.
-
selectWithIndex
Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceLongList- Specified by:
selectWithIndexin interfaceOrderedLongIterable- Specified by:
selectWithIndexin interfaceReversibleLongIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceLongList- Specified by:
rejectWithIndexin interfaceOrderedLongIterable- Specified by:
rejectWithIndexin interfaceReversibleLongIterable- Since:
- 11.1.
-
collect
Description copied from interface:LongIterableReturns 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 interfaceLongIterable- Specified by:
collectin interfaceLongList- Specified by:
collectin interfaceMutableLongCollection- Specified by:
collectin interfaceOrderedLongIterable- Specified by:
collectin interfaceReversibleLongIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceLongList- Specified by:
collectWithIndexin interfaceOrderedLongIterable- Specified by:
collectWithIndexin interfaceReversibleLongIterable- Since:
- 9.1.
-
reverseThis
MutableLongList reverseThis() -
toReversed
MutableLongList toReversed()- Specified by:
toReversedin interfaceLongList- Specified by:
toReversedin interfaceReversibleLongIterable
-
distinct
MutableLongList distinct()- Specified by:
distinctin interfaceLongList- Specified by:
distinctin interfaceReversibleLongIterable- Since:
- 6.0.
-
sortThis
MutableLongList 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> MutableLongList sortThisBy(LongToObjectFunction<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
MutableLongList asUnmodifiable()- Specified by:
asUnmodifiablein interfaceMutableLongCollection
-
asSynchronized
MutableLongList asSynchronized()- Specified by:
asSynchronizedin interfaceMutableLongCollection
-
toImmutable
ImmutableLongList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceLongList- Specified by:
toImmutablein interfaceMutableLongCollection
-
subList
-
zipLong
Returns aMutableListformed from thisMutableLongListand anotherLongListby combining corresponding elements in pairs. If one of the twoLongLists is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableListformed from thisMutableLongListand 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 interfaceMutableLongCollection- Since:
- 9.2.
-