de.jreality.scene.data
Class IntArrayArray

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.IntArrayArray
All Implemented Interfaces:
Serializable, Iterable, Collection, List
Direct Known Subclasses:
IntArrayArray.Array, IntArrayArray.Inlined

public abstract class IntArrayArray
extends DataList

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

getLength

public final int getLength()

getLengthAt

public abstract int getLengthAt(int n)

getValueAt

public abstract IntArray getValueAt(int n)

toIntArrayArray

public final IntArrayArray toIntArrayArray()
Overrides:
toIntArrayArray in class DataList

toIntArrayArray

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