Class DoubleArrayList
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.list.mutable.primitive.DoubleArrayList
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,MutableDoubleCollection
,DoubleIterable
,DoubleList
,MutableDoubleList
,OrderedDoubleIterable
,ReversibleDoubleIterable
,PrimitiveIterable
public class DoubleArrayList extends AbstractDoubleIterable implements MutableDoubleList, java.io.Externalizable
DoubleArrayList is similar to FastList, and is memory-optimized for double primitives. This file was automatically generated from template file primitiveArrayList.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
DoubleArrayList.InternalDoubleIterator
-
Field Summary
Fields Modifier and Type Field Description private static double[]
DEFAULT_SIZED_EMPTY_ARRAY
protected double[]
items
private static int
MAXIMUM_ARRAY_SIZE
private static long
serialVersionUID
protected int
size
private static double[]
ZERO_SIZED_ARRAY
-
Constructor Summary
Constructors Constructor Description DoubleArrayList()
DoubleArrayList(double... array)
DoubleArrayList(int initialCapacity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(double newItem)
boolean
addAll(double... source)
boolean
addAll(DoubleIterable source)
boolean
addAllAtIndex(int index, double... source)
boolean
addAllAtIndex(int index, DoubleIterable source)
void
addAtIndex(int index, double element)
private void
addAtIndexLessThanSize(int index, double element)
boolean
allSatisfy(DoublePredicate predicate)
Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(DoublePredicate predicate)
Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.void
appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
Prints a string representation of this collection onto the givenAppendable
.LazyDoubleIterable
asReversed()
MutableDoubleList
asSynchronized()
MutableDoubleList
asUnmodifiable()
int
binarySearch(double value)
private void
checkEmpty()
RichIterable<DoubleIterable>
chunk(int size)
Partitions elements in fixed size chunks.void
clear()
<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.<V,R extends java.util.Collection<V>>
Rcollect(DoubleToObjectFunction<? extends V> function, R target)
Same asDoubleIterable.collect(DoubleToObjectFunction)
, only the results are added to the target Collection.boolean
contains(double value)
Returns true if the value is contained in the DoubleIterable, and false if it is not.private void
copyItems(int sourceSize, double[] source)
private double[]
copyItemsWithNewCapacity(int newCapacity)
int
count(DoublePredicate predicate)
Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.double
detectIfNone(DoublePredicate predicate, double ifNone)
MutableDoubleList
distinct()
double
dotProduct(DoubleList list)
MutableDoubleIterator
doubleIterator()
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.void
each(DoubleProcedure procedure)
A synonym for forEach.void
ensureCapacity(int minCapacity)
private void
ensureCapacityForAdd()
boolean
equals(java.lang.Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(DoubleIntProcedure procedure)
double
get(int index)
double
getFirst()
double
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(double value)
<T> T
injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
<T> T
injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(double value)
double
max()
double
min()
DoubleArrayList
newEmpty()
Creates a new empty DoubleArrayList.private java.lang.IndexOutOfBoundsException
newIndexOutOfBoundsException(int index)
static DoubleArrayList
newList(DoubleIterable source)
static DoubleArrayList
newListWith(double... elements)
Creates a new list using the passedelements
argument as the backing store.static DoubleArrayList
newWithNValues(int size, double value)
void
readExternal(java.io.ObjectInput in)
DoubleArrayList
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.<R extends MutableDoubleCollection>
Rreject(DoublePredicate predicate, R target)
Same asDoubleIterable.reject(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.boolean
remove(double value)
boolean
removeAll(double... source)
boolean
removeAll(DoubleIterable source)
double
removeAtIndex(int index)
boolean
removeIf(DoublePredicate predicate)
boolean
retainAll(double... source)
boolean
retainAll(DoubleIterable source)
DoubleArrayList
reverseThis()
DoubleArrayList
select(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.<R extends MutableDoubleCollection>
Rselect(DoublePredicate predicate, R target)
Same asDoubleIterable.select(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.double
set(int index, double element)
private void
shiftElementsAtIndex(int index, int sourceSize)
int
size()
Returns the number of items in this iterable.private int
sizePlusFiftyPercent(int oldSize)
DoubleArrayList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).DoubleArrayList
sortThis(DoubleComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.java.util.Spliterator.OfDouble
spliterator()
MutableDoubleList
subList(int fromIndex, int toIndex)
double
sum()
void
swap(int index1, int index2)
private void
throwOutOfBounds(int index)
double[]
toArray()
Converts the DoubleIterable to a primitive double array.double[]
toArray(double[] target)
Converts the DoubleIterable to a primitive double array.ImmutableDoubleList
toImmutable()
Returns an immutable copy of this list.DoubleArrayList
toReversed()
private void
transferItemsToNewArrayWithCapacity(int newCapacity)
void
trimToSize()
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)
DoubleArrayList
with(double element)
DoubleArrayList
with(double element1, double element2)
DoubleArrayList
with(double element1, double element2, double element3)
DoubleArrayList
with(double element1, double element2, double element3, double... elements)
DoubleArrayList
withAll(DoubleIterable elements)
private DoubleArrayList
withArrayCopy(double[] elements, int begin, int length)
DoubleArrayList
without(double element)
DoubleArrayList
withoutAll(DoubleIterable elements)
static DoubleArrayList
wrapCopy(double... array)
Creates a new list by first copying the array passed in.void
writeExternal(java.io.ObjectOutput out)
<T> MutableList<DoubleObjectPair<T>>
zip(java.lang.Iterable<T> iterable)
Returns aMutableList
formed from thisMutableDoubleList
and aListIterable
by combining corresponding elements in pairs.MutableList<DoubleDoublePair>
zipDouble(DoubleIterable iterable)
Returns aMutableList
formed from thisMutableDoubleList
and anotherDoubleList
by combining corresponding elements in pairs.-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractDoubleIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.DoubleList
forEachInBoth, primitiveParallelStream, primitiveStream
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableDoubleList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable
collectWithIndex, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
DEFAULT_SIZED_EMPTY_ARRAY
private static final double[] DEFAULT_SIZED_EMPTY_ARRAY
-
ZERO_SIZED_ARRAY
private static final double[] ZERO_SIZED_ARRAY
-
MAXIMUM_ARRAY_SIZE
private static final int MAXIMUM_ARRAY_SIZE
- See Also:
- Constant Field Values
-
size
protected int size
-
items
protected transient double[] items
-
-
Method Detail
-
newListWith
public static DoubleArrayList newListWith(double... elements)
Creates a new list using the passedelements
argument as the backing store.!!! WARNING: This method uses the passed in array, so can be very unsafe if the original array is held onto anywhere else. !!!
-
newList
public static DoubleArrayList newList(DoubleIterable source)
-
newWithNValues
public static DoubleArrayList newWithNValues(int size, double value)
-
wrapCopy
public static DoubleArrayList wrapCopy(double... array)
Creates a new list by first copying the array passed in.
-
size
public int size()
Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableDoubleCollection
-
contains
public boolean contains(double value)
Description copied from interface:DoubleIterable
Returns true if the value is contained in the DoubleIterable, and false if it is not.- Specified by:
contains
in interfaceDoubleIterable
-
get
public double get(int index)
- Specified by:
get
in interfaceDoubleList
-
newIndexOutOfBoundsException
private java.lang.IndexOutOfBoundsException newIndexOutOfBoundsException(int index)
-
getFirst
public double getFirst()
- Specified by:
getFirst
in interfaceOrderedDoubleIterable
-
getLast
public double getLast()
- Specified by:
getLast
in interfaceReversibleDoubleIterable
-
checkEmpty
private void checkEmpty()
-
indexOf
public int indexOf(double value)
- Specified by:
indexOf
in interfaceOrderedDoubleIterable
-
lastIndexOf
public int lastIndexOf(double value)
- Specified by:
lastIndexOf
in interfaceDoubleList
-
trimToSize
public void trimToSize()
-
transferItemsToNewArrayWithCapacity
private void transferItemsToNewArrayWithCapacity(int newCapacity)
-
copyItemsWithNewCapacity
private double[] copyItemsWithNewCapacity(int newCapacity)
-
sizePlusFiftyPercent
private int sizePlusFiftyPercent(int oldSize)
-
ensureCapacity
public void ensureCapacity(int minCapacity)
-
ensureCapacityForAdd
private void ensureCapacityForAdd()
-
add
public boolean add(double newItem)
- Specified by:
add
in interfaceMutableDoubleCollection
-
addAll
public boolean addAll(double... source)
- Specified by:
addAll
in interfaceMutableDoubleCollection
-
addAll
public boolean addAll(DoubleIterable source)
- Specified by:
addAll
in interfaceMutableDoubleCollection
-
copyItems
private void copyItems(int sourceSize, double[] source)
-
throwOutOfBounds
private void throwOutOfBounds(int index)
-
addAtIndex
public void addAtIndex(int index, double element)
- Specified by:
addAtIndex
in interfaceMutableDoubleList
-
addAtIndexLessThanSize
private void addAtIndexLessThanSize(int index, double element)
-
addAllAtIndex
public boolean addAllAtIndex(int index, double... source)
- Specified by:
addAllAtIndex
in interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, DoubleIterable source)
- Specified by:
addAllAtIndex
in interfaceMutableDoubleList
-
shiftElementsAtIndex
private void shiftElementsAtIndex(int index, int sourceSize)
-
remove
public boolean remove(double value)
- Specified by:
remove
in interfaceMutableDoubleCollection
-
removeIf
public boolean removeIf(DoublePredicate predicate)
- Specified by:
removeIf
in interfaceMutableDoubleCollection
-
wipeAndResetTheEnd
private void wipeAndResetTheEnd(int newCurrentFilledIndex)
-
removeAll
public boolean removeAll(DoubleIterable source)
- Specified by:
removeAll
in interfaceMutableDoubleCollection
-
removeAll
public boolean removeAll(double... source)
- Specified by:
removeAll
in interfaceMutableDoubleCollection
-
retainAll
public boolean retainAll(DoubleIterable source)
- Specified by:
retainAll
in interfaceMutableDoubleCollection
- See Also:
Collection.retainAll(Collection)
-
retainAll
public boolean retainAll(double... source)
- Specified by:
retainAll
in interfaceMutableDoubleCollection
- See Also:
Collection.retainAll(Collection)
-
removeAtIndex
public double removeAtIndex(int index)
- Specified by:
removeAtIndex
in interfaceMutableDoubleList
-
set
public double set(int index, double element)
- Specified by:
set
in interfaceMutableDoubleList
-
swap
public void swap(int index1, int index2)
- Specified by:
swap
in interfaceMutableDoubleList
-
with
public DoubleArrayList with(double element)
- Specified by:
with
in interfaceMutableDoubleCollection
- Specified by:
with
in interfaceMutableDoubleList
-
without
public DoubleArrayList without(double element)
- Specified by:
without
in interfaceMutableDoubleCollection
- Specified by:
without
in interfaceMutableDoubleList
-
withAll
public DoubleArrayList withAll(DoubleIterable elements)
- Specified by:
withAll
in interfaceMutableDoubleCollection
- Specified by:
withAll
in interfaceMutableDoubleList
-
withoutAll
public DoubleArrayList withoutAll(DoubleIterable elements)
- Specified by:
withoutAll
in interfaceMutableDoubleCollection
- Specified by:
withoutAll
in interfaceMutableDoubleList
-
with
public DoubleArrayList with(double element1, double element2)
-
with
public DoubleArrayList with(double element1, double element2, double element3)
-
with
public DoubleArrayList with(double element1, double element2, double element3, double... elements)
-
withArrayCopy
private DoubleArrayList withArrayCopy(double[] elements, int begin, int length)
-
doubleIterator
public MutableDoubleIterator doubleIterator()
Description copied from interface:DoubleIterable
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.- Specified by:
doubleIterator
in interfaceDoubleIterable
- Specified by:
doubleIterator
in interfaceMutableDoubleCollection
-
each
public void each(DoubleProcedure procedure)
Description copied from interface:DoubleIterable
A synonym for forEach.- Specified by:
each
in interfaceDoubleIterable
- Since:
- 7.0.
-
forEachWithIndex
public void forEachWithIndex(DoubleIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedDoubleIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceDoubleIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedDoubleIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleDoubleIterable
-
chunk
public RichIterable<DoubleIterable> chunk(int size)
Description copied from interface:DoubleIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceDoubleIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingDoubleIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
count
public int count(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.- Specified by:
count
in interfaceDoubleIterable
-
anySatisfy
public boolean anySatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceDoubleIterable
-
allSatisfy
public boolean allSatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceDoubleIterable
-
select
public DoubleArrayList select(DoublePredicate predicate)
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 interfaceMutableDoubleList
- Specified by:
select
in interfaceOrderedDoubleIterable
- Specified by:
select
in interfaceReversibleDoubleIterable
-
select
public <R extends MutableDoubleCollection> R select(DoublePredicate predicate, R target)
Description copied from interface:DoubleIterable
Same asDoubleIterable.select(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.- Specified by:
select
in interfaceDoubleIterable
- Since:
- 8.1.
-
reject
public DoubleArrayList reject(DoublePredicate predicate)
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 interfaceMutableDoubleList
- Specified by:
reject
in interfaceOrderedDoubleIterable
- Specified by:
reject
in interfaceReversibleDoubleIterable
-
reject
public <R extends MutableDoubleCollection> R reject(DoublePredicate predicate, R target)
Description copied from interface:DoubleIterable
Same asDoubleIterable.reject(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.- Specified by:
reject
in interfaceDoubleIterable
- Since:
- 8.1.
-
detectIfNone
public double detectIfNone(DoublePredicate predicate, double ifNone)
- Specified by:
detectIfNone
in interfaceDoubleIterable
-
collect
public <V> MutableList<V> collect(DoubleToObjectFunction<? extends V> function)
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 interfaceMutableDoubleList
- Specified by:
collect
in interfaceOrderedDoubleIterable
- Specified by:
collect
in interfaceReversibleDoubleIterable
-
collect
public <V,R extends java.util.Collection<V>> R collect(DoubleToObjectFunction<? extends V> function, R target)
Description copied from interface:DoubleIterable
Same asDoubleIterable.collect(DoubleToObjectFunction)
, only the results are added to the target Collection.- Specified by:
collect
in interfaceDoubleIterable
- Since:
- 8.1.
-
max
public double max()
- Specified by:
max
in interfaceDoubleIterable
-
min
public double min()
- Specified by:
min
in interfaceDoubleIterable
-
sum
public double sum()
- Specified by:
sum
in interfaceDoubleIterable
-
dotProduct
public double dotProduct(DoubleList list)
- Specified by:
dotProduct
in interfaceDoubleList
-
toArray
public double[] toArray()
Description copied from interface:DoubleIterable
Converts the DoubleIterable to a primitive double array.- Specified by:
toArray
in interfaceDoubleIterable
-
toArray
public double[] toArray(double[] target)
Description copied from interface:DoubleIterable
Converts the DoubleIterable to a primitive double array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArray
in interfaceDoubleIterable
-
equals
public boolean equals(java.lang.Object otherList)
Description copied from interface:DoubleList
Follows the same general contract asList.equals(Object)
.- Specified by:
equals
in interfaceDoubleList
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:DoubleList
Follows the same general contract asList.hashCode()
.- Specified by:
hashCode
in interfaceDoubleList
- Overrides:
hashCode
in classjava.lang.Object
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
-
asUnmodifiable
public MutableDoubleList asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableDoubleCollection
- Specified by:
asUnmodifiable
in interfaceMutableDoubleList
-
asSynchronized
public MutableDoubleList asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableDoubleCollection
- Specified by:
asSynchronized
in interfaceMutableDoubleList
-
toImmutable
public ImmutableDoubleList toImmutable()
Description copied from interface:MutableDoubleList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceDoubleList
- Specified by:
toImmutable
in interfaceMutableDoubleCollection
- Specified by:
toImmutable
in interfaceMutableDoubleList
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
asReversed
public LazyDoubleIterable asReversed()
- Specified by:
asReversed
in interfaceReversibleDoubleIterable
-
reverseThis
public DoubleArrayList reverseThis()
- Specified by:
reverseThis
in interfaceMutableDoubleList
-
sortThis
public DoubleArrayList sortThis()
Description copied from interface:MutableDoubleList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableDoubleList
-
sortThis
public DoubleArrayList sortThis(DoubleComparator comparator)
Description copied from interface:MutableDoubleList
Sorts the internal data structure of this list and returns the list itself as a convenience.- Specified by:
sortThis
in interfaceMutableDoubleList
-
toReversed
public DoubleArrayList toReversed()
- Specified by:
toReversed
in interfaceDoubleList
- Specified by:
toReversed
in interfaceMutableDoubleList
- Specified by:
toReversed
in interfaceReversibleDoubleIterable
-
binarySearch
public int binarySearch(double value)
- Specified by:
binarySearch
in interfaceDoubleList
-
distinct
public MutableDoubleList distinct()
- Specified by:
distinct
in interfaceDoubleList
- Specified by:
distinct
in interfaceMutableDoubleList
- Specified by:
distinct
in interfaceReversibleDoubleIterable
-
subList
public MutableDoubleList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceDoubleList
- Specified by:
subList
in interfaceMutableDoubleList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipDouble
public MutableList<DoubleDoublePair> zipDouble(DoubleIterable iterable)
Description copied from interface:MutableDoubleList
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
- Specified by:
zipDouble
in interfaceMutableDoubleList
- Since:
- 9.1.
-
newEmpty
public DoubleArrayList newEmpty()
Creates a new empty DoubleArrayList.- Specified by:
newEmpty
in interfaceMutableDoubleCollection
- Specified by:
newEmpty
in interfaceMutableDoubleList
- Since:
- 9.2.
-
zip
public <T> MutableList<DoubleObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Description copied from interface:MutableDoubleList
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
- Specified by:
zip
in interfaceMutableDoubleList
- Since:
- 9.1.
-
spliterator
public java.util.Spliterator.OfDouble spliterator()
- Specified by:
spliterator
in interfaceDoubleList
-
-