de.jreality.scene.data
Class DoubleArrayArray

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.DoubleArrayArray
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List
Direct Known Subclasses:
DoubleArrayArray.Array, DoubleArrayArray.Inlined

public abstract class DoubleArrayArray
extends DataList

An immutable array of DoubleArrays. 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. This class is abstract it leaves the implementation and especially the storage model to its subclasses.

Version:
1.0
Author:
Tim Hoffmann
See Also:
Serialized Form

Nested Class Summary
static class DoubleArrayArray.Array
          This implementation of DoubleArrayArray stores the data as an array of 2-arrays.
static class DoubleArrayArray.Inlined
           
 
Method Summary
abstract  int getLength()
           
abstract  int getLengthAt(int n)
           
abstract  DoubleArray getValueAt(int n)
           
abstract  double getValueAt(int n, int i)
           
 DoubleArrayArray toDoubleArrayArray()
           
 double[][] toDoubleArrayArray(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, toDoubleArray, toIntArray, toIntArrayArray, toString
 
Methods inherited from class de.jreality.scene.data.DataItem
copyTo, copyTo, printUsage, toDoubleArray, 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
 

Method Detail

getValueAt

public abstract double getValueAt(int n,
                                  int i)

getLength

public abstract int getLength()

getLengthAt

public abstract int getLengthAt(int n)

getValueAt

public abstract DoubleArray getValueAt(int n)

toDoubleArrayArray

public final DoubleArrayArray toDoubleArrayArray()
Overrides:
toDoubleArrayArray in class DataList

toDoubleArrayArray

public double[][] toDoubleArrayArray(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:
toDoubleArrayArray in class DataItem