public final class ArrayDouble extends ListDouble implements Serializable
double[]
into a ListDouble
.Constructor and Description |
---|
ArrayDouble(double... array)
A new read-only
ArrayDouble that wraps around the given array. |
ArrayDouble(double[] array,
boolean readOnly)
A new
ArrayDouble that wraps around the given array. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
getDouble(int index)
Returns the element at the specified position in this list casted to a double.
|
IteratorDouble |
iterator()
Returns an iterator over the elements of the collection.
|
void |
setDouble(int index,
double value)
Changes the element at the specified position, casting to the internal
representation.
|
int |
size()
Returns the number of elements in the collection.
|
public ArrayDouble(double... array)
ArrayDouble
that wraps around the given array.array
- an arraypublic ArrayDouble(double[] array, boolean readOnly)
ArrayDouble
that wraps around the given array.array
- an arrayreadOnly
- if false the wrapper allows writes to the arraypublic final IteratorDouble iterator()
CollectionNumber
iterator
in interface CollectionDouble
iterator
in interface CollectionNumber
iterator
in class ListDouble
public final int size()
CollectionNumber
size
in interface CollectionNumber
public double getDouble(int index)
ListNumber
getDouble
in interface ListNumber
index
- position of the element to returnpublic void setDouble(int index, double value)
ListNumber
setDouble
in interface ListNumber
setDouble
in class ListDouble
index
- position of the element to changevalue
- the new valuepublic boolean equals(Object obj)
equals
in class ListDouble
Copyright © 2015. All rights reserved.