Interface MutableDoubleList
- All Superinterfaces:
DoubleIterable
,DoubleList
,MutableDoubleCollection
,OrderedDoubleIterable
,PrimitiveIterable
,ReversibleDoubleIterable
- All Known Implementing Classes:
DoubleArrayList
,SynchronizedDoubleList
,UnmodifiableDoubleList
public interface MutableDoubleList extends MutableDoubleCollection, DoubleList
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, double... source)
boolean
addAllAtIndex(int index, DoubleIterable source)
void
addAtIndex(int index, double element)
MutableDoubleList
asSynchronized()
MutableDoubleList
asUnmodifiable()
<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.MutableDoubleList
distinct()
default MutableDoubleList
newEmpty()
Creates a new empty mutable version of the same List type.MutableDoubleList
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.double
removeAtIndex(int index)
MutableDoubleList
reverseThis()
MutableDoubleList
select(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.double
set(int index, double element)
default MutableDoubleList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).default MutableDoubleList
shuffleThis(Random rnd)
Randomly permutes this list mutating its contents and returns the same list (this).MutableDoubleList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).default MutableDoubleList
sortThis(DoubleComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.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
.default <T> MutableDoubleList
sortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.MutableDoubleList
subList(int fromIndex, int toIndex)
default void
swap(int index1, int index2)
default MutableDoubleList
tap(DoubleProcedure procedure)
ImmutableDoubleList
toImmutable()
Returns an immutable copy of this list.MutableDoubleList
toReversed()
MutableDoubleList
with(double element)
MutableDoubleList
withAll(DoubleIterable elements)
MutableDoubleList
without(double element)
MutableDoubleList
withoutAll(DoubleIterable elements)
default <T> MutableList<DoubleObjectPair<T>>
zip(Iterable<T> list)
Returns aMutableList
formed from thisMutableDoubleList
and aListIterable
by combining corresponding elements in pairs.default MutableList<DoubleDoublePair>
zipDouble(DoubleIterable iterable)
Returns aMutableList
formed from thisMutableDoubleList
and anotherDoubleList
by 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, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.list.primitive.DoubleList
binarySearch, dotProduct, equals, 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
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 Details
-
addAtIndex
void addAtIndex(int index, double element) -
addAllAtIndex
boolean addAllAtIndex(int index, double... source) -
addAllAtIndex
-
removeAtIndex
double removeAtIndex(int index) -
set
double set(int index, double element) -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceDoubleList
- Specified by:
select
in interfaceMutableDoubleCollection
- Specified by:
select
in interfaceOrderedDoubleIterable
- Specified by:
select
in interfaceReversibleDoubleIterable
-
reject
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceDoubleList
- Specified by:
reject
in interfaceMutableDoubleCollection
- Specified by:
reject
in interfaceOrderedDoubleIterable
- Specified by:
reject
in interfaceReversibleDoubleIterable
-
with
- Specified by:
with
in interfaceMutableDoubleCollection
-
without
- Specified by:
without
in interfaceMutableDoubleCollection
-
withAll
- Specified by:
withAll
in interfaceMutableDoubleCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableDoubleCollection
-
tap
- Specified by:
tap
in interfaceDoubleIterable
- Specified by:
tap
in interfaceDoubleList
- Specified by:
tap
in interfaceMutableDoubleCollection
- Since:
- 9.0.
-
collect
Description copied from interface:DoubleIterable
Returns 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:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceDoubleList
- Specified by:
collect
in interfaceMutableDoubleCollection
- Specified by:
collect
in interfaceOrderedDoubleIterable
- Specified by:
collect
in interfaceReversibleDoubleIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceDoubleList
- Specified by:
collectWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
collectWithIndex
in interfaceReversibleDoubleIterable
- Since:
- 9.1.
-
reverseThis
MutableDoubleList reverseThis() -
toReversed
MutableDoubleList toReversed()- Specified by:
toReversed
in interfaceDoubleList
- Specified by:
toReversed
in interfaceReversibleDoubleIterable
-
distinct
MutableDoubleList distinct()- Specified by:
distinct
in interfaceDoubleList
- Specified by:
distinct
in interfaceReversibleDoubleIterable
- Since:
- 6.0.
-
sortThis
MutableDoubleList 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> MutableDoubleList sortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as 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
MutableDoubleList asUnmodifiable()- Specified by:
asUnmodifiable
in interfaceMutableDoubleCollection
-
asSynchronized
MutableDoubleList asSynchronized()- Specified by:
asSynchronized
in interfaceMutableDoubleCollection
-
toImmutable
ImmutableDoubleList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceDoubleList
- Specified by:
toImmutable
in interfaceMutableDoubleCollection
-
subList
- Specified by:
subList
in interfaceDoubleList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipDouble
Returns aMutableList
formed from thisMutableDoubleList
and anotherDoubleList
by combining corresponding elements in pairs. If one of the twoDoubleList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipDouble
in interfaceDoubleList
- Since:
- 9.1.
-
zip
Returns aMutableList
formed from thisMutableDoubleList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zip
in interfaceDoubleList
- Since:
- 9.1.
-
newEmpty
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableDoubleCollection
- Since:
- 9.2.
-