|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jbeans.j3d.data.DataArray
net.jbeans.j3d.data.IntArray
IntArray is an array of (primitive) integers.
DataArray
Field Summary |
Fields inherited from class net.jbeans.j3d.data.DataArray |
array, dimension, maxId, size, tupleT |
Constructor Summary | |
IntArray()
|
|
IntArray(DataArray da)
|
|
IntArray(int dim)
Construct a new IntArray object. |
Method Summary | |
boolean |
allocate(int size)
Allocate memory for this array. |
void |
copy(DataArray da)
|
int |
getDataType()
Get the data type. |
double |
getElement(int i,
int j)
Return the data element at the i th tuple and
j th element location. |
double[] |
getTuple(int i)
Get a copy of a tuple at the i th location. |
void |
getTuple(int i,
double[] tuple)
Copy the tuple value into a user-provided array. |
int |
getValue(int id)
Get the data at a particular index. |
void |
insertElement(int i,
int j,
double e)
Insert the data element at i th tuple and
j th element location. |
int |
insertNextTuple(double[] tuple)
Insert (memory allocation performed) the tuple onto the end of the array. |
int |
insertNextValue(int i)
Insert data at the end of the array. |
void |
insertTuple(int i,
double[] tuple)
Insert (memory allocation performed) the tuple into the ith location in the array. |
void |
insertValue(int id,
int i)
Insert data at a specified position in the array. |
DataArray |
makeObject()
Virtual constructor creates object of same type as this object. |
protected java.lang.Object |
resize(int size)
resize the array. |
void |
setArray(int[] array)
This method lets the user specify data to be held by the array. |
void |
setElement(int i,
int j,
double e)
Set the data element at the i th tuple and
j th element location. |
void |
setNumberOfTuples(int number)
Set the number of n-tuples in the array. |
void |
setNumberOfValues(int number)
Specify the number of values for this object to hold. |
void |
setTuple(int i,
double[] tuple)
Set the tuple value at the ith location in the array. |
void |
setValue(int id,
int value)
Set the data at a particular index. |
Methods inherited from class net.jbeans.j3d.data.DataArray |
ensureSpace, getData, getData, getDimension, getMaxId, getNumberOfTuples, getSize, initialize, reset, setDimension, squeeze |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IntArray(int dim)
dim
- the dimension of the tuple.public IntArray()
public IntArray(DataArray da)
Method Detail |
public void copy(DataArray da)
copy
in class DataArray
public DataArray makeObject()
makeObject
in class DataArray
public void setArray(int[] array)
true
to keep the class from deleting the array when it cleans up or
reallocates memory.
The class uses the actual array provided; it does not copy the data
from the suppled array.
array
- protected java.lang.Object resize(int size)
resize
in class DataArray
public boolean allocate(int size)
allocate
in class DataArray
public void setNumberOfValues(int number)
public void setNumberOfTuples(int number)
setNumberOfTuples
in class DataArray
number
-
public double[] getTuple(int i)
i
th location.
getTuple
in class DataArray
i
-
public void getTuple(int i, double[] tuple)
getTuple
in class DataArray
i
- tuple
-
public void setTuple(int i, double[] tuple)
setTuple
in class DataArray
i
- tuple
-
public void insertTuple(int i, double[] tuple)
insertTuple
in class DataArray
i
- tuple
-
public int insertNextTuple(double[] tuple)
insertNextTuple
in class DataArray
tuple
-
public int getDataType()
getDataType
in class DataArray
public int getValue(int id)
public void setValue(int id, int value)
public void insertValue(int id, int i)
public int insertNextValue(int i)
public double getElement(int i, int j) throws java.lang.ArrayIndexOutOfBoundsException
i
th tuple and
j
th element location.
Note that i
is less than number of tuples and
j
is less than the dimension.
getElement
in class DataArray
i
- the index to the i
th tuple.j
- the index to the j
th element of the tuple.
java.lang.ArrayIndexOutOfBoundsException
public void setElement(int i, int j, double e) throws java.lang.ArrayIndexOutOfBoundsException
i
th tuple and
j
th element location.
Note that i
is less than number of tuples and
j
is less than the dimension.
setElement
in class DataArray
i
- the index to the i
th tuple.j
- the index to the j
th element of the tuple.e
- the element to be set.
java.lang.ArrayIndexOutOfBoundsException
public void insertElement(int i, int j, double e) throws java.lang.ArrayIndexOutOfBoundsException
i
th tuple and
j
th element location.
insertElement
in class DataArray
java.lang.ArrayIndexOutOfBoundsException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |