@NotThreadSafe
public final class DoubleArrayList
extends java.lang.Object
implements com.gs.collections.api.list.primitive.MutableDoubleList, java.io.Externalizable
FastList, and is memory-optimized for double primitives.
This file was automatically generated from template file primitiveArrayList.stg.| Constructor and Description |
|---|
DoubleArrayList() |
DoubleArrayList(double... array) |
DoubleArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(double newItem) |
boolean |
addAll(double... source) |
boolean |
addAll(com.gs.collections.api.DoubleIterable source) |
boolean |
addAllAtIndex(int index,
double... source) |
boolean |
addAllAtIndex(int index,
com.gs.collections.api.DoubleIterable source) |
void |
addAtIndex(int index,
double element) |
boolean |
allSatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
boolean |
anySatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
void |
appendString(java.lang.Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String separator)
Prints a string representation of this collection onto the given
Appendable. |
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 given
Appendable. |
com.gs.collections.api.LazyDoubleIterable |
asLazy() |
com.gs.collections.api.DoubleIterable |
asReversed() |
com.gs.collections.api.list.primitive.MutableDoubleList |
asSynchronized() |
com.gs.collections.api.list.primitive.MutableDoubleList |
asUnmodifiable() |
double |
average() |
void |
clear() |
<V> com.gs.collections.api.list.MutableList<V> |
collect(com.gs.collections.api.block.function.primitive.DoubleToObjectFunction<? extends V> function) |
boolean |
contains(double value) |
boolean |
containsAll(double... source) |
boolean |
containsAll(com.gs.collections.api.DoubleIterable source) |
int |
count(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
double |
detectIfNone(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate,
double ifNone) |
double |
dotProduct(com.gs.collections.api.list.primitive.DoubleList list) |
com.gs.collections.api.iterator.DoubleIterator |
doubleIterator() |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(java.lang.Object otherList)
Follows the same general contract as
List.equals(Object). |
void |
forEach(com.gs.collections.api.block.procedure.primitive.DoubleProcedure procedure) |
void |
forEachWithIndex(com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure procedure) |
double |
get(int index) |
double |
getFirst() |
double |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode(). |
int |
indexOf(double value) |
<T> T |
injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleIntToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
int |
lastIndexOf(double value) |
java.lang.String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
java.lang.String |
makeString(java.lang.String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
java.lang.String |
makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
Returns a string representation of this collection.
|
double |
max() |
double |
maxIfEmpty(double defaultValue) |
double |
median() |
double |
min() |
double |
minIfEmpty(double defaultValue) |
static DoubleArrayList |
newList(com.gs.collections.api.DoubleIterable source) |
static DoubleArrayList |
newListWith(double... elements)
Creates a new list using the passed
elements argument as the backing store. |
static DoubleArrayList |
newWithNValues(int size,
double value) |
boolean |
noneSatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
readExternal(java.io.ObjectInput in) |
DoubleArrayList |
reject(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
boolean |
remove(double value) |
boolean |
removeAll(double... source) |
boolean |
removeAll(com.gs.collections.api.DoubleIterable source) |
double |
removeAtIndex(int index) |
DoubleArrayList |
reverseThis() |
DoubleArrayList |
select(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
double |
set(int index,
double element) |
int |
size()
Returns the number of items in this iterable.
|
DoubleArrayList |
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
|
double |
sum() |
double[] |
toArray() |
com.gs.collections.api.bag.primitive.MutableDoubleBag |
toBag() |
com.gs.collections.api.list.primitive.ImmutableDoubleList |
toImmutable()
Returns an immutable copy of this list.
|
com.gs.collections.api.list.primitive.MutableDoubleList |
toList() |
DoubleArrayList |
toReversed() |
com.gs.collections.api.set.primitive.MutableDoubleSet |
toSet() |
double[] |
toSortedArray() |
com.gs.collections.api.list.primitive.MutableDoubleList |
toSortedList() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
void |
trimToSize() |
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(com.gs.collections.api.DoubleIterable elements) |
DoubleArrayList |
without(double element) |
DoubleArrayList |
withoutAll(com.gs.collections.api.DoubleIterable elements) |
void |
writeExternal(java.io.ObjectOutput out) |
public DoubleArrayList()
public DoubleArrayList(int initialCapacity)
public DoubleArrayList(double... array)
public static DoubleArrayList newListWith(double... elements)
elements 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. !!!public static DoubleArrayList newList(com.gs.collections.api.DoubleIterable source)
public static DoubleArrayList newWithNValues(int size, double value)
public int size()
com.gs.collections.api.PrimitiveIterablesize in interface com.gs.collections.api.PrimitiveIterablepublic boolean isEmpty()
com.gs.collections.api.PrimitiveIterableisEmpty in interface com.gs.collections.api.PrimitiveIterablepublic boolean notEmpty()
com.gs.collections.api.PrimitiveIterablenotEmpty in interface com.gs.collections.api.PrimitiveIterablepublic void clear()
clear in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean contains(double value)
contains in interface com.gs.collections.api.DoubleIterablepublic boolean containsAll(double... source)
containsAll in interface com.gs.collections.api.DoubleIterablepublic boolean containsAll(com.gs.collections.api.DoubleIterable source)
containsAll in interface com.gs.collections.api.DoubleIterablepublic double get(int index)
get in interface com.gs.collections.api.list.primitive.DoubleListpublic double getFirst()
getFirst in interface com.gs.collections.api.list.primitive.DoubleListpublic double getLast()
getLast in interface com.gs.collections.api.list.primitive.DoubleListpublic int indexOf(double value)
indexOf in interface com.gs.collections.api.list.primitive.DoubleListpublic int lastIndexOf(double value)
lastIndexOf in interface com.gs.collections.api.list.primitive.DoubleListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(double newItem)
add in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean addAll(double... source)
addAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean addAll(com.gs.collections.api.DoubleIterable source)
addAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic void addAtIndex(int index,
double element)
addAtIndex in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic boolean addAllAtIndex(int index,
double... source)
addAllAtIndex in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic boolean addAllAtIndex(int index,
com.gs.collections.api.DoubleIterable source)
addAllAtIndex in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic boolean remove(double value)
remove in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean removeAll(com.gs.collections.api.DoubleIterable source)
removeAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean removeAll(double... source)
removeAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic double removeAtIndex(int index)
removeAtIndex in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic double set(int index,
double element)
set in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList with(double element)
with in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwith in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList without(double element)
without in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithout in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList withAll(com.gs.collections.api.DoubleIterable elements)
withAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithAll in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList withoutAll(com.gs.collections.api.DoubleIterable elements)
withoutAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithoutAll in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList with(double element1, double element2)
public DoubleArrayList with(double element1, double element2, double element3)
public DoubleArrayList with(double element1, double element2, double element3, double... elements)
public com.gs.collections.api.iterator.DoubleIterator doubleIterator()
doubleIterator in interface com.gs.collections.api.DoubleIterablepublic void forEach(com.gs.collections.api.block.procedure.primitive.DoubleProcedure procedure)
forEach in interface com.gs.collections.api.DoubleIterablepublic void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure procedure)
public <T> T injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleToObjectFunction<? super T,? extends T> function)
public <T> T injectIntoWithIndex(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
public int count(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
count in interface com.gs.collections.api.DoubleIterablepublic boolean anySatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
anySatisfy in interface com.gs.collections.api.DoubleIterablepublic boolean allSatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
allSatisfy in interface com.gs.collections.api.DoubleIterablepublic boolean noneSatisfy(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
noneSatisfy in interface com.gs.collections.api.DoubleIterablepublic DoubleArrayList select(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
select in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionselect in interface com.gs.collections.api.DoubleIterableselect in interface com.gs.collections.api.list.primitive.DoubleListselect in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList reject(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
reject in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionreject in interface com.gs.collections.api.DoubleIterablereject in interface com.gs.collections.api.list.primitive.DoubleListreject in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic double detectIfNone(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate,
double ifNone)
detectIfNone in interface com.gs.collections.api.DoubleIterablepublic <V> com.gs.collections.api.list.MutableList<V> collect(com.gs.collections.api.block.function.primitive.DoubleToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectioncollect in interface com.gs.collections.api.DoubleIterablecollect in interface com.gs.collections.api.list.primitive.DoubleListcollect in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic double max()
max in interface com.gs.collections.api.DoubleIterablepublic double min()
min in interface com.gs.collections.api.DoubleIterablepublic double minIfEmpty(double defaultValue)
minIfEmpty in interface com.gs.collections.api.DoubleIterablepublic double maxIfEmpty(double defaultValue)
maxIfEmpty in interface com.gs.collections.api.DoubleIterablepublic double sum()
sum in interface com.gs.collections.api.DoubleIterablepublic double dotProduct(com.gs.collections.api.list.primitive.DoubleList list)
dotProduct in interface com.gs.collections.api.list.primitive.DoubleListpublic double average()
average in interface com.gs.collections.api.DoubleIterablepublic double median()
median in interface com.gs.collections.api.DoubleIterablepublic double[] toArray()
toArray in interface com.gs.collections.api.DoubleIterablepublic double[] toSortedArray()
toSortedArray in interface com.gs.collections.api.DoubleIterablepublic boolean equals(java.lang.Object otherList)
com.gs.collections.api.list.primitive.DoubleListList.equals(Object).equals in interface com.gs.collections.api.list.primitive.DoubleListequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.list.primitive.DoubleListList.hashCode().hashCode in interface com.gs.collections.api.list.primitive.DoubleListhashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.PrimitiveIterabletoString in class java.lang.Objectpublic java.lang.String makeString()
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String separator)
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterablemakeString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String separator)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic com.gs.collections.api.list.primitive.MutableDoubleList toList()
toList in interface com.gs.collections.api.DoubleIterablepublic com.gs.collections.api.list.primitive.MutableDoubleList toSortedList()
toSortedList in interface com.gs.collections.api.DoubleIterablepublic com.gs.collections.api.set.primitive.MutableDoubleSet toSet()
toSet in interface com.gs.collections.api.DoubleIterablepublic com.gs.collections.api.bag.primitive.MutableDoubleBag toBag()
toBag in interface com.gs.collections.api.DoubleIterablepublic com.gs.collections.api.LazyDoubleIterable asLazy()
asLazy in interface com.gs.collections.api.DoubleIterablepublic com.gs.collections.api.list.primitive.MutableDoubleList asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionasUnmodifiable in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic com.gs.collections.api.list.primitive.MutableDoubleList asSynchronized()
asSynchronized in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionasSynchronized in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic com.gs.collections.api.list.primitive.ImmutableDoubleList toImmutable()
com.gs.collections.api.list.primitive.MutableDoubleListtoImmutable in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectiontoImmutable in interface com.gs.collections.api.list.primitive.DoubleListtoImmutable in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic com.gs.collections.api.DoubleIterable asReversed()
public DoubleArrayList reverseThis()
reverseThis in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList sortThis()
com.gs.collections.api.list.primitive.MutableDoubleListsortThis in interface com.gs.collections.api.list.primitive.MutableDoubleListpublic DoubleArrayList toReversed()
toReversed in interface com.gs.collections.api.list.primitive.MutableDoubleList