Class DoubleArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractDoubleIterable
org.eclipse.collections.impl.list.mutable.primitive.DoubleArrayList
- All Implemented Interfaces:
Externalizable,Serializable,MutableDoubleCollection,DoubleIterable,DoubleList,MutableDoubleList,OrderedDoubleIterable,ReversibleDoubleIterable,PrimitiveIterable
public class DoubleArrayList
extends AbstractDoubleIterable
implements MutableDoubleList, 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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(double newItem) booleanaddAll(double... source) booleanaddAll(DoubleIterable source) booleanaddAllAtIndex(int index, double... source) booleanaddAllAtIndex(int index, DoubleIterable source) voidaddAtIndex(int index, double element) booleanallSatisfy(DoublePredicate predicate) booleananySatisfy(DoublePredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(double value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(DoubleToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(DoubleToObjectFunction<? extends V> function, R target) booleancontains(double value) intcount(DoublePredicate predicate) doubledetectIfNone(DoublePredicate predicate, double ifNone) distinct()doubledotProduct(DoubleList list) voideach(DoubleProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(DoubleIntProcedure procedure) doubleget(int index) doublegetFirst()doublegetLast()inthashCode()intindexOf(double value) <T> TinjectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(double value) doublemax()doublemin()newEmpty()Creates a new empty DoubleArrayList.static DoubleArrayListnewList(DoubleIterable source) static DoubleArrayListnewListWith(double... elements) Creates a new list using the passedelementsargument as the backing store.static DoubleArrayListnewWithNValues(int size, double value) voidreject(DoublePredicate predicate) <R extends MutableDoubleCollection>
Rreject(DoublePredicate predicate, R target) booleanremove(double value) booleanremoveAll(double... source) booleanremoveAll(DoubleIterable source) doubleremoveAtIndex(int index) booleanremoveIf(DoublePredicate predicate) booleanretainAll(double... source) booleanretainAll(DoubleIterable source) select(DoublePredicate predicate) <R extends MutableDoubleCollection>
Rselect(DoublePredicate predicate, R target) doubleset(int index, double element) intsize()sortThis()sortThis(DoubleComparator comparator) subList(int fromIndex, int toIndex) doublesum()voidswap(int index1, int index2) double[]toArray()double[]toArray(double[] target) toStack()voidwith(double element) with(double element1, double element2) with(double element1, double element2, double element3) with(double element1, double element2, double element3, double... elements) withAll(DoubleIterable elements) without(double element) withoutAll(DoubleIterable elements) static DoubleArrayListwrapCopy(double... array) Creates a new list by first copying the array passed in.void<T> MutableList<DoubleObjectPair<T>>zipDouble(DoubleIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractDoubleIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.DoubleList
forEachInBoth, primitiveParallelStream, primitiveStreamMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableDoubleList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
DoubleArrayList
public DoubleArrayList() -
DoubleArrayList
public DoubleArrayList(int initialCapacity) -
DoubleArrayList
public DoubleArrayList(double... array)
-
-
Method Details
-
newListWith
Creates a new list using the passedelementsargument 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
-
newWithNValues
-
wrapCopy
Creates a new list by first copying the array passed in. -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableDoubleCollection
-
contains
public boolean contains(double value) - Specified by:
containsin interfaceDoubleIterable
-
get
public double get(int index) - Specified by:
getin interfaceDoubleList
-
getFirst
public double getFirst()- Specified by:
getFirstin interfaceOrderedDoubleIterable
-
getLast
public double getLast()- Specified by:
getLastin interfaceReversibleDoubleIterable
-
indexOf
public int indexOf(double value) - Specified by:
indexOfin interfaceOrderedDoubleIterable
-
lastIndexOf
public int lastIndexOf(double value) - Specified by:
lastIndexOfin interfaceDoubleList
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(double newItem) - Specified by:
addin interfaceMutableDoubleCollection
-
addAll
public boolean addAll(double... source) - Specified by:
addAllin interfaceMutableDoubleCollection
-
addAll
- Specified by:
addAllin interfaceMutableDoubleCollection
-
addAtIndex
public void addAtIndex(int index, double element) - Specified by:
addAtIndexin interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, double... source) - Specified by:
addAllAtIndexin interfaceMutableDoubleList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableDoubleList
-
remove
public boolean remove(double value) - Specified by:
removein interfaceMutableDoubleCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableDoubleCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableDoubleCollection
-
removeAll
public boolean removeAll(double... source) - Specified by:
removeAllin interfaceMutableDoubleCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableDoubleCollection
-
retainAll
public boolean retainAll(double... source) - Specified by:
retainAllin interfaceMutableDoubleCollection
-
removeAtIndex
public double removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableDoubleList
-
set
public double set(int index, double element) - Specified by:
setin interfaceMutableDoubleList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableDoubleList
-
with
- Specified by:
within interfaceMutableDoubleCollection- Specified by:
within interfaceMutableDoubleList
-
without
- Specified by:
withoutin interfaceMutableDoubleCollection- Specified by:
withoutin interfaceMutableDoubleList
-
withAll
- Specified by:
withAllin interfaceMutableDoubleCollection- Specified by:
withAllin interfaceMutableDoubleList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableDoubleCollection- Specified by:
withoutAllin interfaceMutableDoubleList
-
with
-
with
-
with
-
doubleIterator
- Specified by:
doubleIteratorin interfaceDoubleIterable- Specified by:
doubleIteratorin interfaceMutableDoubleCollection
-
each
- Specified by:
eachin interfaceDoubleIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedDoubleIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceDoubleIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedDoubleIterable- Specified by:
injectIntoWithIndexin interfaceReversibleDoubleIterable
-
chunk
- Specified by:
chunkin interfaceDoubleIterable
-
count
- Specified by:
countin interfaceDoubleIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceDoubleIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceDoubleIterable
-
select
- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceDoubleList- Specified by:
selectin interfaceMutableDoubleCollection- Specified by:
selectin interfaceMutableDoubleList- Specified by:
selectin interfaceOrderedDoubleIterable- Specified by:
selectin interfaceReversibleDoubleIterable
-
select
- Specified by:
selectin interfaceDoubleIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceDoubleList- Specified by:
rejectin interfaceMutableDoubleCollection- Specified by:
rejectin interfaceMutableDoubleList- Specified by:
rejectin interfaceOrderedDoubleIterable- Specified by:
rejectin interfaceReversibleDoubleIterable
-
reject
- Specified by:
rejectin interfaceDoubleIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceDoubleIterable
-
collect
- Specified by:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceDoubleList- Specified by:
collectin interfaceMutableDoubleCollection- Specified by:
collectin interfaceMutableDoubleList- Specified by:
collectin interfaceOrderedDoubleIterable- Specified by:
collectin interfaceReversibleDoubleIterable
-
collect
public <V,R extends Collection<V>> R collect(DoubleToObjectFunction<? extends V> function, R target) - Specified by:
collectin interfaceDoubleIterable- Since:
- 8.1.
-
max
public double max()- Specified by:
maxin interfaceDoubleIterable
-
min
public double min()- Specified by:
minin interfaceDoubleIterable
-
sum
public double sum()- Specified by:
sumin interfaceDoubleIterable
-
dotProduct
- Specified by:
dotProductin interfaceDoubleList
-
toArray
public double[] toArray()- Specified by:
toArrayin interfaceDoubleIterable
-
toArray
public double[] toArray(double[] target) - Specified by:
toArrayin interfaceDoubleIterable
-
equals
- Specified by:
equalsin interfaceDoubleList- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceDoubleList- Overrides:
hashCodein classObject
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableDoubleCollection- Specified by:
asUnmodifiablein interfaceMutableDoubleList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableDoubleCollection- Specified by:
asSynchronizedin interfaceMutableDoubleList
-
toImmutable
- Specified by:
toImmutablein interfaceDoubleList- Specified by:
toImmutablein interfaceMutableDoubleCollection- Specified by:
toImmutablein interfaceMutableDoubleList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleDoubleIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableDoubleList
-
sortThis
- Specified by:
sortThisin interfaceMutableDoubleList
-
sortThis
- Specified by:
sortThisin interfaceMutableDoubleList
-
toReversed
- Specified by:
toReversedin interfaceDoubleList- Specified by:
toReversedin interfaceMutableDoubleList- Specified by:
toReversedin interfaceReversibleDoubleIterable
-
binarySearch
public int binarySearch(double value) - Specified by:
binarySearchin interfaceDoubleList
-
distinct
- Specified by:
distinctin interfaceDoubleList- Specified by:
distinctin interfaceMutableDoubleList- Specified by:
distinctin interfaceReversibleDoubleIterable
-
subList
- Specified by:
subListin interfaceDoubleList- Specified by:
subListin interfaceMutableDoubleList
-
zipDouble
- Specified by:
zipDoublein interfaceDoubleList- Specified by:
zipDoublein interfaceMutableDoubleList- Since:
- 9.1.
-
newEmpty
Creates a new empty DoubleArrayList.- Specified by:
newEmptyin interfaceMutableDoubleCollection- Specified by:
newEmptyin interfaceMutableDoubleList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceDoubleList- Specified by:
zipin interfaceMutableDoubleList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableDoubleList
-
toStack
- Specified by:
toStackin interfaceOrderedDoubleIterable
-
spliterator
- Specified by:
spliteratorin interfaceDoubleList
-