@NotThreadSafe public class DoubleArrayList extends AbstractDoubleIterable 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.| Modifier and Type | Field and Description |
|---|---|
protected double[] |
items |
protected int |
size |
| 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,
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 |
asReversed() |
com.gs.collections.api.list.primitive.MutableDoubleList |
asSynchronized() |
com.gs.collections.api.list.primitive.MutableDoubleList |
asUnmodifiable() |
int |
binarySearch(double value) |
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) |
int |
count(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
double |
detectIfNone(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate,
double ifNone) |
com.gs.collections.api.list.primitive.MutableDoubleList |
distinct() |
double |
dotProduct(com.gs.collections.api.list.primitive.DoubleList list) |
com.gs.collections.api.iterator.MutableDoubleIterator |
doubleIterator() |
void |
each(com.gs.collections.api.block.procedure.primitive.DoubleProcedure procedure) |
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) |
int |
lastIndexOf(double value) |
double |
max() |
double |
min() |
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) |
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) |
boolean |
retainAll(double... source) |
boolean |
retainAll(com.gs.collections.api.DoubleIterable source) |
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).
|
com.gs.collections.api.list.primitive.MutableDoubleList |
subList(int fromIndex,
int toIndex) |
double |
sum() |
double[] |
toArray() |
com.gs.collections.api.list.primitive.ImmutableDoubleList |
toImmutable()
Returns an immutable copy of this list.
|
DoubleArrayList |
toReversed() |
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) |
appendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic 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 void clear()
clear in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionpublic boolean contains(double value)
contains 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.ordered.primitive.OrderedDoubleIterablepublic double getLast()
getLast in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic int indexOf(double value)
indexOf in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterablepublic 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 boolean retainAll(com.gs.collections.api.DoubleIterable source)
retainAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionCollection.retainAll(Collection)public boolean retainAll(double... source)
retainAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionCollection.retainAll(Collection)public 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.MutableDoubleIterator doubleIterator()
doubleIterator in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectiondoubleIterator 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 each(com.gs.collections.api.block.procedure.primitive.DoubleProcedure procedure)
each in interface com.gs.collections.api.DoubleIterablepublic void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure procedure)
forEachWithIndex in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterablepublic <T> T injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleToObjectFunction<? super T,? extends T> function)
injectInto in interface com.gs.collections.api.DoubleIterablepublic <T> T injectIntoWithIndex(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterableinjectIntoWithIndex in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic 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.MutableDoubleListselect in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterableselect in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic 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.MutableDoubleListreject in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterablereject in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic 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.MutableDoubleListcollect in interface com.gs.collections.api.ordered.primitive.OrderedDoubleIterablecollect in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic double max()
max in interface com.gs.collections.api.DoubleIterablepublic double min()
min 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[] toArray()
toArray 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 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 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.LazyDoubleIterable asReversed()
asReversed in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic 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.DoubleListtoReversed in interface com.gs.collections.api.list.primitive.MutableDoubleListtoReversed in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic int binarySearch(double value)
binarySearch in interface com.gs.collections.api.list.primitive.DoubleListpublic com.gs.collections.api.list.primitive.MutableDoubleList distinct()
distinct in interface com.gs.collections.api.list.primitive.DoubleListdistinct in interface com.gs.collections.api.list.primitive.MutableDoubleListdistinct in interface com.gs.collections.api.ordered.primitive.ReversibleDoubleIterablepublic com.gs.collections.api.list.primitive.MutableDoubleList subList(int fromIndex,
int toIndex)
subList in interface com.gs.collections.api.list.primitive.DoubleListsubList in interface com.gs.collections.api.list.primitive.MutableDoubleListList#subList(int fromIndex, int toIndex)}