|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.factory.IlrArray
public class IlrArray
This class contains static methods for invoking the XOM API on array classes. This class manage the native Java arrays and the dynamic arrays.
Method Summary | |
---|---|
static Object |
get(Object array,
int index)
Gets an element of an array. |
static boolean |
getBoolean(Object array,
int index)
Gets an element of an array as a boolean value. |
static byte |
getByte(Object array,
int index)
Gets an element of an array as a byte value. |
static char |
getChar(Object array,
int index)
Gets an element of an array as a char value. |
static double |
getDouble(Object array,
int index)
Gets an element of an array as a double value. |
static float |
getFloat(Object array,
int index)
Gets an element of an array as a float value. |
static int |
getInt(Object array,
int index)
Gets an element of an array as an int value. |
static int |
getLength(Object array)
Gets the length of an array. |
static long |
getLong(Object array,
int index)
Gets an element of an array as a long value. |
static short |
getShort(Object array,
int index)
Gets an element of an array as a short value. |
static Object |
newInstance(IlrType componentType,
int length)
Deprecated. As of JRules 6.5, use IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int) instead. |
static Object |
newInstance(IlrType componentType,
int[] dimensions)
Deprecated. As of JRules 6.5, use IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int[]) instead. |
static void |
set(Object array,
int index,
Object value)
Sets an element of an array to a value. |
static void |
setBoolean(Object array,
int index,
boolean value)
Sets an element of an array to a boolean value. |
static void |
setByte(Object array,
int index,
byte b)
Sets an element of an array to a byte value. |
static void |
setChar(Object array,
int index,
char c)
Sets an element of an array to a char value. |
static void |
setDouble(Object array,
int index,
double d)
Sets an element of an array to a double value. |
static void |
setFloat(Object array,
int index,
float f)
Sets an element of an array to a float value. |
static void |
setInt(Object array,
int index,
int i)
Sets an element of an array to an int value. |
static void |
setLong(Object array,
int index,
long l)
Sets an element of an array to a long value. |
static void |
setShort(Object array,
int index,
short s)
Sets an element of an array to a short value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Object newInstance(IlrType componentType, int length) throws NegativeArraySizeException
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int)
instead.
componentType
and of length
length
.
NegativeArraySizeException
- If the passed length is negative.componentType
- The component type.length
- The array length.
public static Object newInstance(IlrType componentType, int[] dimensions) throws IllegalArgumentException, NegativeArraySizeException
IlrReflect.newArrayInstance(ilog.rules.bom.IlrType, int[])
instead.
componentType
.
NegativeArraySizeException
- If the passed length is negative.
IllegalArgumentException
componentType
- The component type.dimensions
- The dimensions of the array.
public static int getLength(Object array) throws IllegalArgumentException
IllegalArgumentException
array
- An array object.
public static Object get(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
public static boolean getBoolean(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static char getChar(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static byte getByte(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static short getShort(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static int getInt(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static long getLong(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static float getFloat(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static double getDouble(Object array, int index) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.
get(java.lang.Object,int)
public static void set(Object array, int index, Object value) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- An array object.index
- The index of the element to get.value
- The value of the element.public static void setBoolean(Object array, int index, boolean value) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, char c) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, byte b) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, short s) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, int i) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, long l) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, float f) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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(Object array, int index, double d) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
- If the passed index is greater
than the array length.
IllegalArgumentException
array
- 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)
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |