sidl

Class Character.Array

Enclosing Class:
Character
Known Direct Subclasses:
Character.Array1, Character.Array2, Character.Array3, Character.Array4, Character.Array5, Character.Array6, Character.Array7

public static class Character.Array
extends BaseArray

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

Nested Class Summary

static class
Character.Array.Holder

Nested classes/interfaces inherited from class gov.llnl.sidl.BaseArray

BaseArray.Holder

Field Summary

Fields inherited from class gov.llnl.sidl.BaseArray

d_array, d_owner

Constructor Summary

Array()
Construct an empty array object.
Array(int dim, int[] lower, int[] upper, boolean isRow)
Create an array with the specified lower and upper bounds.
Array(long array, boolean owner)
Create an array using an IOR array pointer.

Method Summary

void
_copy(Character.Array dest)
Method Copy copies the elements of 'this' to an already existing array of the same size.
Character.Array
_dcast()
Casts this array to an array of a defined dimension and returns the resulting array.
char
_get(int i, int j, int k, int l, int m, int n, int o)
Native routine to fetch the specified value from the array.
void
_reallocate(int dim, int[] lower, int[] upper, boolean isRow)
Native routine to reallocate data in the array.
void
_set(int i, int j, int k, int l, int m, int n, int o, char value)
Native routine to set the specified value in the array.
Character.Array
_slice(int dimen, int[] numElem, int[] srcStart, int[] srcStride, int[] newStart)
Slice returns an array that is <= the orignial array.

Methods inherited from class gov.llnl.sidl.BaseArray

_addRef, _deallocate, _destroy, _dim, _isColumnOrder, _isRowOrder, _length, _lower, _reallocate, _smartCopy, _stride, _type, _upper, checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkDimension, checkIndexBounds, checkNullArray, destroy, dim, finalize, get_ior_pointer, get_owner, isNull, lower, reallocate, reset, set_ior_pointer, set_owner, stride, upper

Constructor Details

Array

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

Array

public Array(int dim,
             int[] lower,
             int[] upper,
             boolean isRow)
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. If isRow is true, the array will be in Row order

Array

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

Method Details

_copy

public void _copy(Character.Array dest)
Method Copy copies the elements of 'this' to an already existing array of the same size. NOT LIKE clone()!!

_dcast

public Character.Array _dcast()
Casts this array to an array of a defined dimension and returns the resulting array. (You might want to deallocate the original array. Argument dimen determines what dimension array to cast this array to.

_get

public char _get(int i,
                 int j,
                 int k,
                 int l,
                 int m,
                 int n,
                 int o)
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.

_reallocate

public void _reallocate(int dim,
                        int[] lower,
                        int[] upper,
                        boolean isRow)
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 lower bounds.) Invalid indices will have unpredictable (but almost certainly bad) results. This routine will deallocate the existing array data if it is not null.
Overrides:
_reallocate in interface BaseArray

_set

public void _set(int i,
                 int j,
                 int k,
                 int l,
                 int m,
                 int n,
                 int o,
                 char 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.

_slice

public Character.Array _slice(int dimen,
                              int[] numElem,
                              int[] srcStart,
                              int[] srcStride,
                              int[] newStart)
Slice returns an array that is <= the orignial array. It shares data with the orginal array. dimen gives the number of dimensions in the result array numElem array gives the number of elements in each dimension srcStart gives the array index to start the result array at srcStride gives the stride of the result array's elements over the original array's elements. See the Babel user's manual for more information.