Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.list.mutable.primitive

public Class DoubleArrayList

extends AbstractDoubleIterable
implements MutableDoubleList, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.list.primitive.MutableDoubleList, org.eclipse.collections.api.list.primitive.DoubleList, org.eclipse.collections.api.ordered.primitive.ReversibleDoubleIterable, org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable, org.eclipse.collections.api.DoubleIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, .Spliterator, .Spliterators, org.eclipse.collections.api.DoubleIterable, .LazyDoubleIterable, .RichIterable, org.eclipse.collections.api.block.comparator.primitive.DoubleComparator, org.eclipse.collections.api.block.function.primitive.ObjectDoubleIntToObjectFunction, .ObjectDoubleToObjectFunction, .DoubleToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.DoublePredicate, org.eclipse.collections.api.block.procedure.primitive.DoubleIntProcedure, .DoubleProcedure, org.eclipse.collections.api.collection.primitive.MutableDoubleCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.iterator.MutableDoubleIterator, .DoubleIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.DoubleList, .ImmutableDoubleList, .MutableDoubleList, org.eclipse.collections.api.set.primitive.DoubleSet, .MutableDoubleSet, org.eclipse.collections.api.stack.primitive.MutableDoubleStack, org.eclipse.collections.api.tuple.primitive.DoubleDoublePair, .DoubleObjectPair, org.eclipse.collections.impl.factory.primitive.DoubleLists, .DoubleStacks, org.eclipse.collections.impl.lazy.primitive.ReverseDoubleIterable, org.eclipse.collections.impl.primitive.AbstractDoubleIterable, org.eclipse.collections.impl.set.mutable.primitive.DoubleHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, org.eclipse.collections.impl.utility.primitive.DoubleQuickSort

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private static final double[]
protected transient double[]
private static final int
private static final long
protected int
private static final double[]

Constructor Summary

AccessConstructor and Description
public
public
DoubleArrayList(int initialCapacity)

public
DoubleArrayList(double... array)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public void
private void
addAtIndexLessThanSize(int index, double element)

public boolean
allSatisfy(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.allSatisfy.

Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.anySatisfy.

Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyDoubleIterable
public MutableDoubleList
public MutableDoubleList
public int
public MutableList<Double>
private void
public RichIterable<DoubleIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.DoubleIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableList<V>
collect(DoubleToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.MutableDoubleList.collect, org.eclipse.collections.api.DoubleIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(DoubleToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.collect.

Same as collect(DoubleToObjectFunction) , only the results are added to the target Collection.

public boolean
contains(double value)

Implements org.eclipse.collections.api.DoubleIterable.contains.

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)

public int
count(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.count.

Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.

public double
public MutableDoubleList
public double
public MutableDoubleIterator
doubleIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.doubleIterator, org.eclipse.collections.api.DoubleIterable.doubleIterator.

Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.

public void
each(DoubleProcedure procedure)

Implements org.eclipse.collections.api.DoubleIterable.each.

A synonym for forEach.

public void
ensureCapacity(int minCapacity)

private void
public boolean
public void
public double
public double
public double
public int
public int
public <T> T
injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.DoubleIterable.injectInto.

public <T> T
public int
public double
public double
public DoubleArrayList
newEmpty()

Overrides default org.eclipse.collections.api.list.primitive.MutableDoubleList.newEmpty.

Creates a new empty DoubleArrayList.

private IndexOutOfBoundsException
public static DoubleArrayList
public static DoubleArrayList
newListWith(double... elements)

Creates a new list using the passed elements argument as the backing store.

public static DoubleArrayList
newWithNValues(int size, double value)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public DoubleArrayList
reject(DoublePredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableDoubleList.reject, org.eclipse.collections.api.DoubleIterable.reject.

Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.

public <R extends MutableDoubleCollection> R
reject(DoublePredicate predicate, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.reject.

Same as reject(DoublePredicate) , only the results are added to the target MutableDoubleCollection.

public boolean
public boolean
public boolean
public double
public boolean
public boolean
public boolean
public DoubleArrayList
public DoubleArrayList
select(DoublePredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableDoubleList.select, org.eclipse.collections.api.DoubleIterable.select.

Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.

public <R extends MutableDoubleCollection> R
select(DoublePredicate predicate, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.select.

Same as select(DoublePredicate) , only the results are added to the target MutableDoubleCollection.

public double
private void
shiftElementsAtIndex(int index, int sourceSize)

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
sizePlusFiftyPercent(int oldSize)

public DoubleArrayList
sortThis()

Implements org.eclipse.collections.api.list.primitive.MutableDoubleList.sortThis.

Sorts this list mutating its contents and returns the same mutable list (this).

public DoubleArrayList
sortThis(DoubleComparator comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableDoubleList.sortThis.

Sorts the internal data structure of this list and returns the list itself as a convenience.

public Spliterator.OfDouble
public MutableDoubleList
public double
public void
private void
throwOutOfBounds(int index)

public double[]
toArray()

Implements org.eclipse.collections.api.DoubleIterable.toArray.

Converts the DoubleIterable to a primitive double array.

public double[]
toArray(double[] target)

Overrides default org.eclipse.collections.api.DoubleIterable.toArray.

Converts the DoubleIterable to a primitive double array.

public ImmutableDoubleList
public DoubleArrayList
public MutableDoubleStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable.toStack.

Converts the collection to a DoubleStack.

private void
public void
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)

public DoubleArrayList
public 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 DoubleArrayList
private DoubleArrayList
withArrayCopy(double[] elements, int begin, int length)

public DoubleArrayList
public DoubleArrayList
public static DoubleArrayList
wrapCopy(double... array)

Creates a new list by first copying the array passed in.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

public <T> MutableList<DoubleObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableDoubleList.zip.

Returns a MutableList formed from this MutableDoubleList and a ListIterable by combining corresponding elements in pairs.

public MutableList<DoubleDoublePair>
zipDouble(DoubleIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableDoubleList.zipDouble.

Returns a MutableList formed from this MutableDoubleList and another DoubleList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.primitive.AbstractDoubleIterable:
asLazyaveragemaxIfEmptymedianminIfEmptytoBagtoListtoSettoSortedArraytoSortedListtoString