public class ArrayDoubleList extends java.lang.Object implements DoubleList
DoubleList backed by a double-array, supporting all DoubleList-methods by modifying and/or replacing the
underlying array.| Constructor and Description |
|---|
ArrayDoubleList() |
ArrayDoubleList(DoubleCollection xs) |
ArrayDoubleList(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAllDoubles(double... xs) |
boolean |
addAllDoubles(DoubleCollection xs) |
boolean |
addAllDoublesAt(int index,
double... xs) |
boolean |
addAllDoublesAt(int index,
DoubleCollection xs) |
boolean |
addDouble(double x) |
void |
addDoubleAt(int index,
double x) |
int |
binarySearchExactly(double x) |
void |
clear() |
boolean |
containsAllDoublesExactly(double... xs) |
boolean |
containsDoubleExactly(double x) |
void |
forEachDouble(java.util.function.DoubleConsumer consumer)
Performs the given action for each
double in this iterable. |
double |
getDouble(int index) |
int |
indexOfDoubleExactly(double x) |
boolean |
isEmpty() |
DoubleIterator |
iterator() |
int |
lastIndexOfDoubleExactly(double x) |
DoubleListIterator |
listIterator(int index) |
static ArrayDoubleList |
of(double... contents) |
boolean |
removeAllDoublesExactly(double... xs) |
double |
removeDoubleAt(int index) |
boolean |
removeDoubleExactly(double x) |
boolean |
removeDoublesIf(java.util.function.DoublePredicate filter) |
void |
replaceAllDoubles(java.util.function.DoubleUnaryOperator operator) |
boolean |
retainAllDoublesExactly(double... xs) |
double |
setDouble(int index,
double x) |
int |
size() |
void |
sortDoubles() |
java.util.Spliterator.OfDouble |
spliterator() |
DoubleList |
subList(int fromIndex,
int toIndex) |
double[] |
toDoubleArray()
Collect the
doubles in this DoubleCollection into an double-array. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, add, addAll, addAll, contains, containsAll, copy, get, indexOf, indexOfDouble, lastIndexOf, lastIndexOfDouble, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, sortDoubles, toArray, toArraycontainsAllDoubles, containsAllDoubles, containsAllDoublesExactly, containsAnyDoubles, containsAnyDoubles, containsAnyDoublesExactly, containsAnyDoublesExactly, containsDouble, doubleStream, forEach, from, from, once, once, parallelDoubleStream, removeAllDoubles, removeAllDoubles, removeAllDoublesExactly, removeDouble, retainAllDoubles, retainAllDoubles, retainAllDoublesExactly, sequencepublic ArrayDoubleList()
public ArrayDoubleList(int capacity)
public ArrayDoubleList(DoubleCollection xs)
public static ArrayDoubleList of(double... contents)
of in interface DoubleIterableof in interface DoubleListDoubleList of the given elements.public int size()
size in interface java.util.Collection<java.lang.Double>size in interface java.util.List<java.lang.Double>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Double>isEmpty in interface java.util.List<java.lang.Double>isEmpty in interface DoubleCollectionisEmpty in interface DoubleIterableisEmpty in interface DoubleListpublic void clear()
clear in interface java.util.Collection<java.lang.Double>clear in interface java.util.List<java.lang.Double>clear in interface DoubleCollectionclear in interface DoubleIterableclear in interface DoubleListpublic double[] toDoubleArray()
DoubleCollectiondoubles in this DoubleCollection into an double-array.toDoubleArray in interface DoubleCollectionpublic DoubleIterator iterator()
iterator in interface java.lang.Iterable<java.lang.Double>iterator in interface java.util.Collection<java.lang.Double>iterator in interface java.util.List<java.lang.Double>iterator in interface DoubleIterablepublic DoubleListIterator listIterator(int index)
listIterator in interface java.util.List<java.lang.Double>listIterator in interface DoubleListpublic DoubleList subList(int fromIndex, int toIndex)
subList in interface java.util.List<java.lang.Double>subList in interface DoubleListpublic void sortDoubles()
sortDoubles in interface DoubleListpublic int binarySearchExactly(double x)
binarySearchExactly in interface DoubleListpublic void replaceAllDoubles(java.util.function.DoubleUnaryOperator operator)
replaceAllDoubles in interface DoubleListpublic double getDouble(int index)
getDouble in interface DoubleListpublic double setDouble(int index,
double x)
setDouble in interface DoubleListpublic void addDoubleAt(int index,
double x)
addDoubleAt in interface DoubleListpublic double removeDoubleAt(int index)
removeDoubleAt in interface DoubleListpublic int lastIndexOfDoubleExactly(double x)
lastIndexOfDoubleExactly in interface DoubleListpublic int indexOfDoubleExactly(double x)
indexOfDoubleExactly in interface DoubleListpublic java.util.Spliterator.OfDouble spliterator()
spliterator in interface java.lang.Iterable<java.lang.Double>spliterator in interface java.util.Collection<java.lang.Double>spliterator in interface java.util.List<java.lang.Double>spliterator in interface DoubleCollectionspliterator in interface DoubleIterablespliterator in interface DoubleListpublic boolean addDouble(double x)
addDouble in interface DoubleCollectionaddDouble in interface DoubleListpublic boolean addAllDoubles(double... xs)
addAllDoubles in interface DoubleCollectionaddAllDoubles in interface DoubleListpublic boolean addAllDoubles(DoubleCollection xs)
addAllDoubles in interface DoubleCollectionaddAllDoubles in interface DoubleListpublic boolean addAllDoublesAt(int index,
double... xs)
addAllDoublesAt in interface DoubleListpublic boolean addAllDoublesAt(int index,
DoubleCollection xs)
addAllDoublesAt in interface DoubleListpublic boolean containsAllDoublesExactly(double... xs)
containsAllDoublesExactly in interface DoubleIterablepublic boolean removeDoubleExactly(double x)
removeDoubleExactly in interface DoubleIterablepublic boolean containsDoubleExactly(double x)
containsDoubleExactly in interface DoubleIterablepublic boolean removeAllDoublesExactly(double... xs)
removeAllDoublesExactly in interface DoubleIterablepublic boolean retainAllDoublesExactly(double... xs)
retainAllDoublesExactly in interface DoubleIterablepublic boolean removeDoublesIf(java.util.function.DoublePredicate filter)
removeDoublesIf in interface DoubleIterablepublic void forEachDouble(java.util.function.DoubleConsumer consumer)
DoubleIterabledouble in this iterable.forEachDouble in interface DoubleIterable