|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
de.jreality.scene.data.DataItem
public abstract class DataItem
Base class for data items of this package supporting different views to the same data using the same reference but still maintaining the readonly constraint of the source.
Constructor Summary | |
---|---|
DataItem(Object source,
int srcOffset)
|
Method Summary | |
---|---|
Object |
copyTo(StorageModel which,
Object target)
Copy the data into the specified array or into a new one if the target parameter is null . |
Object |
copyTo(WritableDataList target)
|
abstract StorageModel |
getStorageModel()
|
static void |
printUsage()
For debugging only: print the usage count of all data items. |
DoubleArray |
toDoubleArray()
|
double[] |
toDoubleArray(double[] target)
Copy the data into the specified array or into a new one if the target parameter is null . |
double[][] |
toDoubleArrayArray(double[][] target)
Copy the data into the specified array or into a new one if the target parameter is null . |
IntArray |
toIntArray()
|
int[] |
toIntArray(int[] target)
Copy the data into the specified array or into a new one if the target parameter is null . |
IntArrayArray |
toIntArrayArray()
|
int[][] |
toIntArrayArray(int[][] target)
Copy the data into the specified array or into a new one if the target parameter is null . |
StringArray |
toStringArray()
|
String[] |
toStringArray(String[] target)
|
StringArrayArray |
toStringArrayArray()
|
String[][] |
toStringArrayArray(String[][] target)
Copy the data into the specified array or into a new one if the target parameter is null . |
Methods inherited from class java.util.AbstractList |
---|
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString |
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, size, toArray, toArray |
Constructor Detail |
---|
public DataItem(Object source, int srcOffset)
Method Detail |
---|
public abstract StorageModel getStorageModel()
public IntArray toIntArray()
public IntArrayArray toIntArrayArray()
public DoubleArray toDoubleArray()
public double[] toDoubleArray(double[] target)
null
. Returns
the filled array.
public double[][] toDoubleArrayArray(double[][] target)
null
. Returns
the filled array.
public int[] toIntArray(int[] target)
null
. Returns
the filled array.
public int[][] toIntArrayArray(int[][] target)
null
. Returns
the filled array.
public StringArray toStringArray()
public StringArrayArray toStringArrayArray()
public String[] toStringArray(String[] target)
public String[][] toStringArrayArray(String[][] target)
null
. Returns
the filled array.
public Object copyTo(StorageModel which, Object target)
null
. Returns
the filled array. The passed in StorageModel specifies the
data format of the target. If the format is a multidim. array
and the target contains null
references, the
storage model must specify an entry size as this
method will create the required arrays. This method will
apply flattening conversions if the target storage model has
less dimensions than the underlying model of this list.
The toXXXArray
() methods are shorthands
for commonly used data formats. Note that unlike the
List.toArray()
method this method will not create a new
array if the target is too small.
public Object copyTo(WritableDataList target)
public static void printUsage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |