All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.math.array.shortArray
java.lang.Object
|
+----com.ibm.math.array.Array
|
+----com.ibm.math.array.shortArray
- public abstract class shortArray
- extends Array
shortArray = abstract class for arrays of shorts
The shortArray abstract class is the parent class of all concrete
arrays of shorts.
It implements the Array.getAsObject and Array.setToObject
methods of interface Array.
It also declares the methods get and set, that must be
implemented by all shortArray<rank> classes.
The following <rank>s are valid:
0D (for 0-dimensional arrays), 1D (for 1-dimensional arrays), 2D, 3D.
-
shortArray()
- Default constructor.
-
get(int[])
- Return the value of an element of the array.
-
getAsObject(int[])
- Return a short object which has the same value as the
specified element of the array.
-
set(int[], short)
- Set the value of an element of the array.
-
setToObject(int[], Object)
- Sets the specified element of the array to a particular value.
shortArray
public shortArray()
- Default constructor.
get
public abstract short get(int index[]) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException
- Return the value of an element of the array.
- Parameters:
- index - index[i] = index ashort i-th axis, 0 <= index[i] < size(i)
- Throws: InvalidArrayIndexException
- index[] must be of length equal to rank
getAsObject
public Object getAsObject(int index[]) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException
- Return a short object which has the same value as the
specified element of the array.
- Parameters:
- index - index[i] = index ashort i-th axis, 0 <= index[i] < size(i)
- Throws: InvalidArrayIndexException
- index[] must be of length equal to rank
- Overrides:
- getAsObject in class Array
set
public abstract void set(int index[],
short d) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException
- Set the value of an element of the array.
- Parameters:
- index - index[i] = index ashort i-th axis, 0 <= index[i] < size(i)
- d - value to which element is set
- Throws: InvalidArrayIndexException
- index[] must be of length equal to rank
setToObject
public void setToObject(int index[],
Object obj) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException, NullPointerException
- Sets the specified element of the array to a particular value.
- Parameters:
- index - index[i] = index ashort i-th axis, 0 <= index[i] < size(i)
- obj - the array element is set to the value of this Object
- Throws: InvalidArrayIndexException
- index[] must be of length equal to rank
- Overrides:
- setToObject in class Array
All Packages Class Hierarchy This Package Previous Next Index