Interface MutableDoubleList
-
- All Superinterfaces:
DoubleIterable,DoubleList,MutableDoubleCollection,OrderedDoubleIterable,PrimitiveIterable,ReversibleDoubleIterable
public interface MutableDoubleList extends MutableDoubleCollection, DoubleList
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, double... source)booleanaddAllAtIndex(int index, DoubleIterable source)voidaddAtIndex(int index, double element)MutableDoubleListasSynchronized()MutableDoubleListasUnmodifiable()MutableList<Double>boxed()<V> MutableList<V>collect(DoubleToObjectFunction<? 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(DoubleIntToObjectFunction<? extends V> function)Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.MutableDoubleListdistinct()default MutableDoubleListnewEmpty()Creates a new empty mutable version of the same List type.MutableDoubleListreject(DoublePredicate predicate)Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.default MutableDoubleListrejectWithIndex(DoubleIntPredicate predicate)Returns a new MutableDoubleList excluding all elements with corresponding indexes matching the specified predicate.doubleremoveAtIndex(int index)MutableDoubleListreverseThis()MutableDoubleListselect(DoublePredicate predicate)Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.default MutableDoubleListselectWithIndex(DoubleIntPredicate predicate)Returns a new MutableDoubleList including all elements with corresponding indexes matching the specified predicate.doubleset(int index, double element)default MutableDoubleListshuffleThis()Randomly permutes this list mutating its contents and returns the same list (this).default MutableDoubleListshuffleThis(Random rnd)Randomly permutes this list mutating its contents and returns the same list (this).MutableDoubleListsortThis()Sorts this list mutating its contents and returns the same mutable list (this).default MutableDoubleListsortThis(DoubleComparator comparator)Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableDoubleListsortThisBy(DoubleToObjectFunction<T> function)Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableDoubleListsortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.MutableDoubleListsubList(int fromIndex, int toIndex)default voidswap(int index1, int index2)default MutableDoubleListtap(DoubleProcedure procedure)ImmutableDoubleListtoImmutable()Returns an immutable copy of this list.MutableDoubleListtoReversed()MutableDoubleListwith(double element)MutableDoubleListwithAll(DoubleIterable elements)MutableDoubleListwithout(double element)MutableDoubleListwithoutAll(DoubleIterable elements)default <T> MutableList<DoubleObjectPair<T>>zip(Iterable<T> list)Returns aMutableListformed from thisMutableDoubleListand aListIterableby combining corresponding elements in pairs.default MutableList<DoubleDoublePair>zipDouble(DoubleIterable iterable)Returns aMutableListformed from thisMutableDoubleListand anotherDoubleListby combining corresponding elements in pairs.-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
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.DoubleList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf, primitiveParallelStream, primitiveStream, spliterator
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable
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.ReversibleDoubleIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
addAtIndex
void addAtIndex(int index, double element)
-
addAllAtIndex
boolean addAllAtIndex(int index, double... source)
-
addAllAtIndex
boolean addAllAtIndex(int index, DoubleIterable source)
-
removeAtIndex
double removeAtIndex(int index)
-
set
double set(int index, double element)
-
boxed
MutableList<Double> boxed()
-
swap
default void swap(int index1, int index2)
-
select
MutableDoubleList select(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceDoubleList- Specified by:
selectin interfaceMutableDoubleCollection- Specified by:
selectin interfaceOrderedDoubleIterable- Specified by:
selectin interfaceReversibleDoubleIterable
-
reject
MutableDoubleList reject(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceDoubleList- Specified by:
rejectin interfaceMutableDoubleCollection- Specified by:
rejectin interfaceOrderedDoubleIterable- Specified by:
rejectin interfaceReversibleDoubleIterable
-
with
MutableDoubleList with(double element)
- Specified by:
within interfaceMutableDoubleCollection
-
without
MutableDoubleList without(double element)
- Specified by:
withoutin interfaceMutableDoubleCollection
-
withAll
MutableDoubleList withAll(DoubleIterable elements)
- Specified by:
withAllin interfaceMutableDoubleCollection
-
withoutAll
MutableDoubleList withoutAll(DoubleIterable elements)
- Specified by:
withoutAllin interfaceMutableDoubleCollection
-
tap
default MutableDoubleList tap(DoubleProcedure procedure)
- Specified by:
tapin interfaceDoubleIterable- Specified by:
tapin interfaceDoubleList- Specified by:
tapin interfaceMutableDoubleCollection- Since:
- 9.0.
-
selectWithIndex
default MutableDoubleList selectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceDoubleList- Specified by:
selectWithIndexin interfaceOrderedDoubleIterable- Specified by:
selectWithIndexin interfaceReversibleDoubleIterable- Since:
- 11.1.
-
rejectWithIndex
default MutableDoubleList rejectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceDoubleList- Specified by:
rejectWithIndexin interfaceOrderedDoubleIterable- Specified by:
rejectWithIndexin interfaceReversibleDoubleIterable- Since:
- 11.1.
-
collect
<V> MutableList<V> collect(DoubleToObjectFunction<? extends V> function)
Description copied from interface:DoubleIterableReturns 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 interfaceDoubleIterable- Specified by:
collectin interfaceDoubleList- Specified by:
collectin interfaceMutableDoubleCollection- Specified by:
collectin interfaceOrderedDoubleIterable- Specified by:
collectin interfaceReversibleDoubleIterable
-
collectWithIndex
default <V> MutableList<V> collectWithIndex(DoubleIntToObjectFunction<? 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 interfaceDoubleList- Specified by:
collectWithIndexin interfaceOrderedDoubleIterable- Specified by:
collectWithIndexin interfaceReversibleDoubleIterable- Since:
- 9.1.
-
reverseThis
MutableDoubleList reverseThis()
-
toReversed
MutableDoubleList toReversed()
- Specified by:
toReversedin interfaceDoubleList- Specified by:
toReversedin interfaceReversibleDoubleIterable
-
distinct
MutableDoubleList distinct()
- Specified by:
distinctin interfaceDoubleList- Specified by:
distinctin interfaceReversibleDoubleIterable- Since:
- 6.0.
-
sortThis
MutableDoubleList sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
-
sortThis
default MutableDoubleList sortThis(DoubleComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.
-
sortThisBy
default <T> MutableDoubleList sortThisBy(DoubleToObjectFunction<T> function)
Sorts the internal data structure of this list based on the natural order of the key returned byfunction.
-
sortThisBy
default <T> MutableDoubleList sortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.
-
shuffleThis
default MutableDoubleList shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.
-
shuffleThis
default MutableDoubleList 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
MutableDoubleList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableDoubleCollection
-
asSynchronized
MutableDoubleList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableDoubleCollection
-
toImmutable
ImmutableDoubleList toImmutable()
Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceDoubleList- Specified by:
toImmutablein interfaceMutableDoubleCollection
-
subList
MutableDoubleList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceDoubleList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipDouble
default MutableList<DoubleDoublePair> zipDouble(DoubleIterable iterable)
Returns aMutableListformed from thisMutableDoubleListand anotherDoubleListby combining corresponding elements in pairs. If one of the twoDoubleLists is longer than the other, its remaining elements are ignored.- Specified by:
zipDoublein interfaceDoubleList- Since:
- 9.1.
-
zip
default <T> MutableList<DoubleObjectPair<T>> zip(Iterable<T> list)
Returns aMutableListformed from thisMutableDoubleListand aListIterableby combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zipin interfaceDoubleList- Since:
- 9.1.
-
newEmpty
default MutableDoubleList newEmpty()
Creates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableDoubleCollection- Since:
- 9.2.
-
-