Rule Execution Server API

ilog.rules.factory
Class IlrBinaryValue

java.lang.Object
  extended by ilog.rules.factory.IlrValue
      extended by ilog.rules.factory.IlrBinaryValue
All Implemented Interfaces:
Serializable

public class IlrBinaryValue
extends IlrValue

This class represents a binary arithmetic expression of the rule language. The field kind specifies the kind of operation involved to compute the binary value, its possible values are defined in the interface IlrBinaryOperator. The binary operation itself is performed by an IlrBinaryOperator. An instance of this class determines its binary operator using the types of the arguments and the kind. If a binary operator can not be determined, the binary operation is not a valid expression.

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
IlrBinaryValue(int kind, IlrValue first, IlrValue second)
          Constructs a binary expression from two values.
 
Method Summary
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores this binary value using a factory explorer and returns an object as a result.
 IlrValue getFirstArgument()
          Gets the first argument of this expression.
 int getKind()
          Gets the kind of the expression.
 IlrBinaryOperator getOperator()
          Gets the binary operator that is used to compute the binary value.
 IlrValue getSecondArgument()
          Gets the second argument of this expression.
 void setFirstArgument(IlrValue first)
          Changes the first argument of this expression.
 void setKind(int kind)
          Sets the kind of this expression.
 void setSecondArgument(IlrValue second)
          Changes the second argument 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
 

Constructor Detail

IlrBinaryValue

public IlrBinaryValue(int kind,
                      IlrValue first,
                      IlrValue second)
Constructs a binary expression from two values.

Parameters:
kind - The type of the binary operation as defined in IlrBinaryOperator.
first - The first argument value.
second - The second argument value.
Method Detail

getKind

public int getKind()
Gets the kind of the expression. The value is one of the constant values defined in IlrBinaryOperator.

Returns:
The kind of this expression.

setKind

public void setKind(int kind)
Sets the kind of this expression. The possible values are defined in IlrBinaryOperator.

Parameters:
kind - The kind of this expression.

getFirstArgument

public IlrValue getFirstArgument()
Gets the first argument of this expression.

Returns:
The first argument of this expression.

setFirstArgument

public void setFirstArgument(IlrValue first)
Changes the first argument of this expression.

Parameters:
first - The first argument of this expression.

getSecondArgument

public IlrValue getSecondArgument()
Gets the second argument of this expression.

Returns:
The second argument of this expression.

setSecondArgument

public void setSecondArgument(IlrValue second)
Changes the second argument of this expression.

Parameters:
second - The second argument of this expression.

getOperator

public IlrBinaryOperator getOperator()
Gets the binary operator that is used to compute the binary value. The binary operator is determined according to the argument types and the kind of operation.

Returns:
A binary operator, or null if the binary value is not valid.

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores this binary value using a factory explorer and returns an object as a result.

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

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013