de.jreality.scene.data
Class DoubleArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
de.jreality.scene.data.DataItem
de.jreality.scene.data.DataList
de.jreality.scene.data.DoubleArray
- All Implemented Interfaces:
- Serializable, Iterable, Collection, List
public class DoubleArray
- extends DataList
An immutable array. A good JIT compiler optimizes this such that access it is not slower
as for the pure array. The advantage is, that only the creator who provided the array is allowed to
change it.
- Version:
- 1.0
- Author:
- Tim Hoffmann
- See Also:
- Serialized Form
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
DoubleArray
public DoubleArray(double[] data)
DoubleArray
public DoubleArray(double[] data,
int offset,
int length)
toDoubleArray
public DoubleArray toDoubleArray()
- Overrides:
toDoubleArray
in class DataList
toDoubleArray
public final double[] toDoubleArray(double[] target)
- Description copied from class:
DataItem
- Copy the data into the specified array or into a new one
if the target parameter is
null
. Returns
the filled array.
- Overrides:
toDoubleArray
in class DataItem
getValueAt
public final double getValueAt(int n)
getLength
public final int getLength()