SIDL
Class Opaque.Array

java.lang.Object
  |
  +--gov.llnl.sidl.BaseArray
        |
        +--SIDL.Opaque.Array
Direct Known Subclasses:
Opaque.Array1, Opaque.Array2, Opaque.Array3, Opaque.Array4
Enclosing class:
Opaque

public static class Opaque.Array
extends BaseArray

Define a one dimensional array of type long for the SIDL Java run-time. Many of these methods will throw array index exceptions if the specified indices are out of bounds.


Field Summary
 
Fields inherited from class gov.llnl.sidl.BaseArray
d_array, d_owner
 
Constructor Summary
  Opaque.Array()
          Construct an empty array object.
  Opaque.Array(int dim, int[] lower, int[] upper)
          Create an array with the specified lower and upper bounds.
protected Opaque.Array(long array, boolean owner)
          Create an array using an IOR array pointer.
 
Method Summary
 void _destroy()
          Native routine to destroy (deallocate) the current array data.
 int _dim()
          Native routine to get the dimension of the current array.
 long _get(int i, int j, int k, int l)
          Native routine to fetch the specified value from the array.
 int _lower(int dim)
          Native routine to fetch the specified lower bound of the array.
 void _reallocate(int dim, int[] lower, int[] upper)
          Native routine to reallocate data in the array.
 void _set(int i, int j, int k, int l, long value)
          Native routine to set the specified value in the array.
 int _upper(int dim)
          Native routine to fetch the specified upper bound of the array.
 
Methods inherited from class gov.llnl.sidl.BaseArray
checkBounds, checkBounds, checkBounds, checkBounds, checkDimension, checkIndexBounds, checkNullArray, destroy, dim, finalize, isNull, lower, reallocate, reset, upper
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Opaque.Array

public Opaque.Array()
Construct an empty array object. This array object must be allocated with realllocate before any actions are performed on the array data.


Opaque.Array

protected Opaque.Array(long array,
                       boolean owner)
Create an array using an IOR array pointer. The pointer value may be zero (representing null).


Opaque.Array

public Opaque.Array(int dim,
                    int[] lower,
                    int[] upper)
Create an array with the specified lower and upper bounds. The upper bounds are inclusive. An array out of bounds exception is thrown if the array bounds or dimension are invalid.

Method Detail

_dim

public int _dim()
Native routine to get the dimension of the current array. This routine assumes that the array has already been initialized. If the array has not been initialized, then horrible things may happen.

Specified by:
_dim in class BaseArray

_lower

public int _lower(int dim)
Native routine to fetch the specified lower bound of the array. The specified array dimension must be between zero and the array dimension minus one. Invalid values will have unpredictable (but almost certainly bad) results.

Specified by:
_lower in class BaseArray

_upper

public int _upper(int dim)
Native routine to fetch the specified upper bound of the array. The specified array dimension must be between zero and the array dimension minus one. Invalid values will have unpredictable (but almost certainly bad) results.

Specified by:
_upper in class BaseArray

_get

public long _get(int i,
                 int j,
                 int k,
                 int l)
Native routine to fetch the specified value from the array. The specified array index/indices must be lie between the array lower upper bounds (inclusive). Invalid indices will have unpredictable (but almost certainly bad) results.


_set

public void _set(int i,
                 int j,
                 int k,
                 int l,
                 long value)
Native routine to set the specified value in the array. The specified array index/indices must be lie between the array lower upper bounds (inclusive). Invalid indices will have unpredictable (but almost certainly bad) results.


_destroy

public void _destroy()
Native routine to destroy (deallocate) the current array data.

Specified by:
_destroy in class BaseArray

_reallocate

public void _reallocate(int dim,
                        int[] lower,
                        int[] upper)
Native routine to reallocate data in the array. The specified array dimension and indices must match and be within valid ranges (e.g., the upper bounds must be greater than or equal to lowe rbounds. Invalid indices will have unpredictable (but almost certainly bad) results. This routine will deallocate the existing array data if it is not null.

Specified by:
_reallocate in class BaseArray