public class IlrArray
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
get(java.lang.Object array,
int index)
Gets an element of an array.
|
static boolean |
getBoolean(java.lang.Object array,
int index)
Gets an element of an array as a boolean value.
|
static byte |
getByte(java.lang.Object array,
int index)
Gets an element of an array as a byte value.
|
static char |
getChar(java.lang.Object array,
int index)
Gets an element of an array as a char value.
|
static double |
getDouble(java.lang.Object array,
int index)
Gets an element of an array as a double value.
|
static float |
getFloat(java.lang.Object array,
int index)
Gets an element of an array as a float value.
|
static int |
getInt(java.lang.Object array,
int index)
Gets an element of an array as an int value.
|
static int |
getLength(java.lang.Object array)
Gets the length of an array.
|
static long |
getLong(java.lang.Object array,
int index)
Gets an element of an array as a long value.
|
static short |
getShort(java.lang.Object array,
int index)
Gets an element of an array as a short value.
|
static java.lang.Object |
newInstance(IlrType componentType,
int length)
Deprecated.
As of JRules 6.5, use
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int) instead. |
static java.lang.Object |
newInstance(IlrType componentType,
int[] dimensions)
Deprecated.
As of JRules 6.5, use
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int[]) instead. |
static void |
set(java.lang.Object array,
int index,
java.lang.Object value)
Sets an element of an array to a value.
|
static void |
setBoolean(java.lang.Object array,
int index,
boolean value)
Sets an element of an array to a boolean value.
|
static void |
setByte(java.lang.Object array,
int index,
byte b)
Sets an element of an array to a byte value.
|
static void |
setChar(java.lang.Object array,
int index,
char c)
Sets an element of an array to a char value.
|
static void |
setDouble(java.lang.Object array,
int index,
double d)
Sets an element of an array to a double value.
|
static void |
setFloat(java.lang.Object array,
int index,
float f)
Sets an element of an array to a float value.
|
static void |
setInt(java.lang.Object array,
int index,
int i)
Sets an element of an array to an int value.
|
static void |
setLong(java.lang.Object array,
int index,
long l)
Sets an element of an array to a long value.
|
static void |
setShort(java.lang.Object array,
int index,
short s)
Sets an element of an array to a short value.
|
public static java.lang.Object newInstance(IlrType componentType, int length) throws java.lang.NegativeArraySizeException
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int) instead.componentType and of length
length.java.lang.NegativeArraySizeException - If the passed length is negative.componentType - The component type.length - The array length.public static java.lang.Object newInstance(IlrType componentType, int[] dimensions) throws java.lang.IllegalArgumentException, java.lang.NegativeArraySizeException
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int[]) instead.componentType.java.lang.NegativeArraySizeException - If the passed length is negative.java.lang.IllegalArgumentExceptioncomponentType - The component type.dimensions - The dimensions of the array.public static int getLength(java.lang.Object array)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionarray - An array object.public static java.lang.Object get(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.public static boolean getBoolean(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static char getChar(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static byte getByte(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static short getShort(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static int getInt(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static long getLong(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static float getFloat(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static double getDouble(java.lang.Object array,
int index)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.get(java.lang.Object,int)public static void set(java.lang.Object array,
int index,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.value - The value of the element.public static void setBoolean(java.lang.Object array,
int index,
boolean value)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.value - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setChar(java.lang.Object array,
int index,
char c)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.c - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setByte(java.lang.Object array,
int index,
byte b)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.b - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setShort(java.lang.Object array,
int index,
short s)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.s - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setInt(java.lang.Object array,
int index,
int i)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.i - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setLong(java.lang.Object array,
int index,
long l)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.l - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setFloat(java.lang.Object array,
int index,
float f)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.f - The value of the element.set(java.lang.Object,int,java.lang.Object)public static void setDouble(java.lang.Object array,
int index,
double d)
throws java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - If the passed index is greater
than the array length.java.lang.IllegalArgumentExceptionarray - An array object.index - The index of the element to get.d - The value of the element.set(java.lang.Object,int,java.lang.Object)© Copyright IBM Corp. 1987, 2017