|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.llnl.sidl.BaseArray
Class BaseArray
is the base array for all SIDL Java arrays
in the run-time system. This class provides basic support for bounds
checking and management of the IOR array pointer object.
Field Summary | |
protected long |
d_array
|
protected boolean |
d_owner
|
Constructor Summary | |
protected |
BaseArray()
Construct an empty array object. |
protected |
BaseArray(long array,
boolean owner)
Create an array using an IOR array pointer. |
Method Summary | |
protected abstract void |
_destroy()
Abstract method to destroy the array. |
abstract int |
_dim()
Abstract method to get the dimension of the array. |
abstract int |
_lower(int dim)
Abstract method to fetch the specified lower bound of the array. |
protected abstract void |
_reallocate(int dim,
int[] lower,
int[] upper)
Abstract method to reallocate array data using the specified dimension, lower bounds, and upper bounds. |
abstract int |
_upper(int dim)
Abstract method to fetch the specified upper bound of the array. |
protected void |
checkBounds(int i)
Check that the index is valid for the array. |
protected void |
checkBounds(int i,
int j)
Check that the indices are valid for the array. |
protected void |
checkBounds(int i,
int j,
int k)
Check that the indices are valid for the array. |
protected void |
checkBounds(int i,
int j,
int k,
int l)
Check that the indices are valid for the array. |
protected void |
checkDimension(int d)
Check that the array is equal to the specified rank. |
protected void |
checkIndexBounds(int i,
int d)
Check that the index is valid for the specified dimension. |
protected void |
checkNullArray()
Throw a NullPointerException if the array is null. |
void |
destroy()
Destroy the existing array and make it null. |
int |
dim()
Return the dimension of the array. |
protected void |
finalize()
The finalizer of this object deallocates the IOR array reference if we are the owner and the referece is not null. |
boolean |
isNull()
Check whether the array referenced by this object is null. |
int |
lower(int dim)
Return the lower index of the array corresponding to the specified array dimension. |
void |
reallocate(int dim,
int[] lower,
int[] upper)
Reallocate array data using the specified dimension and lower and upper bounds. |
protected void |
reset(long array,
boolean owner)
Destroy existing array data (if present and owner) and assign the new array pointer and owner. |
int |
upper(int dim)
Return the upper index of the array corresponding to the specified array dimension. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected long d_array
protected boolean d_owner
Constructor Detail |
protected BaseArray()
protected BaseArray(long array, boolean owner)
Method Detail |
protected void reset(long array, boolean owner)
public boolean isNull()
public abstract int _dim()
public abstract int _lower(int dim)
public abstract int _upper(int dim)
protected abstract void _destroy()
protected abstract void _reallocate(int dim, int[] lower, int[] upper)
public void destroy()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void reallocate(int dim, int[] lower, int[] upper)
dim
elements. Upper array
bounds are inclusive. An array index out of bounds exception is thrown
if any of the indices are invalid.
public int dim()
protected void checkNullArray()
NullPointerException
if the array is null.
protected void checkDimension(int d)
ArrayIndexOutOfBoundsException
is thrown. This routine assumes that the array is not null.
protected void checkIndexBounds(int i, int d)
ArrayIndexOutOfBoundsException
is thrown if the index
is out of bounds. This routine assumes both that the array pointer
is not null and that the dimension argument is valid.
protected void checkBounds(int i)
protected void checkBounds(int i, int j)
protected void checkBounds(int i, int j, int k)
protected void checkBounds(int i, int j, int k, int l)
public int lower(int dim)
public int upper(int dim)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |