de.jreality.scene.data
Class DoubleArray

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by de.jreality.scene.data.DataItem
              extended by de.jreality.scene.data.DataList
                  extended by de.jreality.scene.data.DoubleArray
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.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

Constructor Summary
DoubleArray(double[] data)
           
DoubleArray(double[] data, int offset, int length)
           
 
Method Summary
 int getLength()
           
 double getValueAt(int n)
           
 DoubleArray toDoubleArray()
           
 double[] toDoubleArray(double[] target)
          Copy the data into the specified array or into a new one if the target parameter is null.
 
Methods inherited from class de.jreality.scene.data.DataList
get, getStorageModel, item, readOnlyList, size, toDoubleArrayArray, toIntArray, toIntArrayArray, toString
 
Methods inherited from class de.jreality.scene.data.DataItem
copyTo, copyTo, printUsage, toDoubleArrayArray, toIntArray, toIntArrayArray, toStringArray, toStringArray, toStringArrayArray, toStringArrayArray
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

DoubleArray

public DoubleArray(double[] data)

DoubleArray

public DoubleArray(double[] data,
                   int offset,
                   int length)
Method Detail

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()