Interface MutableLongList
-
- All Superinterfaces:
LongIterable,LongList,MutableLongCollection,OrderedLongIterable,PrimitiveIterable,ReversibleLongIterable
public interface MutableLongList extends MutableLongCollection, LongList
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, long... source)booleanaddAllAtIndex(int index, LongIterable source)voidaddAtIndex(int index, long element)MutableLongListasSynchronized()MutableLongListasUnmodifiable()MutableList<Long>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.MutableLongListdistinct()default MutableLongListnewEmpty()Creates a new empty mutable version of the same List type.MutableLongListreject(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)MutableLongListreverseThis()MutableLongListselect(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 MutableLongListshuffleThis()Randomly 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).MutableLongListsortThis()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.MutableLongListsubList(int fromIndex, int toIndex)default voidswap(int index1, int index2)default MutableLongListtap(LongProcedure procedure)ImmutableLongListtoImmutable()Returns an immutable copy of this list.MutableLongListtoReversed()MutableLongListwith(long element)MutableLongListwithAll(LongIterable elements)MutableLongListwithout(long element)MutableLongListwithoutAll(LongIterable elements)default <T> MutableList<LongObjectPair<T>>zip(Iterable<T> list)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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.LongList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf, primitiveParallelStream, primitiveStream, spliterator
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
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.ReversibleLongIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
addAtIndex
void addAtIndex(int index, long element)
-
addAllAtIndex
boolean addAllAtIndex(int index, long... source)
-
addAllAtIndex
boolean addAllAtIndex(int index, LongIterable source)
-
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
MutableLongList select(LongPredicate predicate)
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
MutableLongList reject(LongPredicate predicate)
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
MutableLongList with(long element)
- Specified by:
within interfaceMutableLongCollection
-
without
MutableLongList without(long element)
- Specified by:
withoutin interfaceMutableLongCollection
-
withAll
MutableLongList withAll(LongIterable elements)
- Specified by:
withAllin interfaceMutableLongCollection
-
withoutAll
MutableLongList withoutAll(LongIterable elements)
- Specified by:
withoutAllin interfaceMutableLongCollection
-
tap
default MutableLongList tap(LongProcedure procedure)
- Specified by:
tapin interfaceLongIterable- Specified by:
tapin interfaceLongList- Specified by:
tapin interfaceMutableLongCollection- Since:
- 9.0.
-
selectWithIndex
default MutableLongList selectWithIndex(LongIntPredicate predicate)
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
default MutableLongList rejectWithIndex(LongIntPredicate predicate)
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
<V> MutableList<V> collect(LongToObjectFunction<? extends V> function)
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
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.- 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
default MutableLongList sortThis(LongComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.
-
sortThisBy
default <T> MutableLongList sortThisBy(LongToObjectFunction<T> function)
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
default MutableLongList shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.
-
shuffleThis
default MutableLongList 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
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
MutableLongList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceLongList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipLong
default MutableList<LongLongPair> zipLong(LongIterable iterable)
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
default <T> MutableList<LongObjectPair<T>> zip(Iterable<T> list)
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
default MutableLongList newEmpty()
Creates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableLongCollection- Since:
- 9.2.
-
-