Rule Execution Server API

ilog.rules.factory
Class IlrArrayElement

java.lang.Object
  extended by ilog.rules.factory.IlrValue
      extended by ilog.rules.factory.IlrArrayElement
All Implemented Interfaces:
IlrAssignable, Serializable

public final class IlrArrayElement
extends IlrValue
implements IlrAssignable

This class represents an array element expression. An array element expression is an expression of the form arr[index]. An array element expression is assignable.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
Serialized Form

Constructor Summary
IlrArrayElement(IlrValue array, IlrValue[] indexes)
          Constructs an array element expression using an array expression and an index expression.
 
Method Summary
 Object exploreAssignable(IlrFactoryExplorer explorer)
          Explores the array element as an assignable entity and returns an object as a result.
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores the array element as a value and returns an object as a result.
 IlrValue getArray()
          Gets the array value of this expression.
 IlrValue[] getIndexes()
          Gets the indexes values of this expression.
 boolean isAssignableFrom(IlrValue value)
          Checks whether the array element can be assigned a given value.
 void setIndexes(IlrValue[] indexes)
          Changes the indexes values of this expression.
 
Methods inherited from class ilog.rules.factory.IlrValue
add, divide, getField, getReflect, getType, getXOMType, invokeEquals, isConstant, isEvent, isEventCondition, isNull, multiply, remainder, subtract, testAfter, testAfter, testBefore, testBefore, testEqual, testFalse, testGreaterOrEqual, testGreaterThan, testIn, testInstanceOf, testLessOrEqual, testLessThan, testNotEqual, testNotIn, testOccursin, testTrue, timeof, toNegative, toPositive, toPostfixDecr, toPostfixIncr, toPrefixDecr, toPrefixIncr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.rules.factory.IlrAssignable
getType
 

Constructor Detail

IlrArrayElement

public IlrArrayElement(IlrValue array,
                       IlrValue[] indexes)
Constructs an array element expression using an array expression and an index expression. The constructed expression is attached to the same IlrReflect object as array.

Parameters:
array - An expression, whose type must be an array.
indexes - An array of expressions, whose type must be integer.
Method Detail

getArray

public IlrValue getArray()
Gets the array value of this expression.

Returns:
The array expression.

getIndexes

public IlrValue[] getIndexes()
Gets the indexes values of this expression.

Returns:
The indexes values.

setIndexes

public void setIndexes(IlrValue[] indexes)
Changes the indexes values of this expression.

Parameters:
indexes - The new indexes values.

isAssignableFrom

public boolean isAssignableFrom(IlrValue value)
Checks whether the array element can be assigned a given value.

Specified by:
isAssignableFrom in interface IlrAssignable
Parameters:
value - The value to be assigned to the array element.
Returns:
true if the assignment is permitted, false otherwise.

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores the array element as a value and returns an object as a result.

Specified by:
exploreValue in class IlrValue
Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

exploreAssignable

public Object exploreAssignable(IlrFactoryExplorer explorer)
Explores the array element as an assignable entity and returns an object as a result.

Specified by:
exploreAssignable in interface IlrAssignable
Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013