Rule Execution Server API

ilog.rules.factory
Class IlrAssignment

java.lang.Object
  extended by ilog.rules.factory.IlrBaseStatement
      extended by ilog.rules.factory.IlrAssignment
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public class IlrAssignment
extends IlrBaseStatement

This class represents an assignment of the rule language.

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

Field Summary
static int ADD_ASSIGN
          This value stands for an add assignment using +=.
static int DIVIDE_ASSIGN
          This value stands for a divide assignment using /=.
static int MULTIPLY_ASSIGN
          This value stands for a multiply assignment using *=.
static int REMAINDER_ASSIGN
          This value stands for a remainder assignment using %=.
static int SIMPLE_ASSIGN
          This value stands for a simple assignment using =.
static int SUBTRACT_ASSIGN
          This value stands for a subtract assignment using -=.
 
Constructor Summary
IlrAssignment(IlrAssignable assignable, IlrValue value)
          Constructs a assignment using an assignable and a value.
IlrAssignment(int kind, IlrAssignable assignable, IlrValue value)
          Constructs a assignment using a specific assignment operator, an assignable and a value.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          This methods explores a statement using a factory explorer.
 IlrAssignable getAssignable()
          Gets the assigned field value.
 int getKind()
          Gets the assignment operator.
 IlrBinaryOperator getOperator()
          Gets an evaluator in the case of an operator assignment, and returns null if the assignment is not good or if the assignment is a simple assignment.
 IlrValue getValue()
          Gets the right-hand side value of this assignment.
 void setKind(int kind)
          Sets the assignment operator to be the one passed as the argument.
 void setValue(IlrValue value)
          Sets the right-hand side value of this assignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLE_ASSIGN

public static final int SIMPLE_ASSIGN
This value stands for a simple assignment using =.

See Also:
Constant Field Values

ADD_ASSIGN

public static final int ADD_ASSIGN
This value stands for an add assignment using +=.

See Also:
Constant Field Values

SUBTRACT_ASSIGN

public static final int SUBTRACT_ASSIGN
This value stands for a subtract assignment using -=.

See Also:
Constant Field Values

MULTIPLY_ASSIGN

public static final int MULTIPLY_ASSIGN
This value stands for a multiply assignment using *=.

See Also:
Constant Field Values

DIVIDE_ASSIGN

public static final int DIVIDE_ASSIGN
This value stands for a divide assignment using /=.

See Also:
Constant Field Values

REMAINDER_ASSIGN

public static final int REMAINDER_ASSIGN
This value stands for a remainder assignment using %=.

See Also:
Constant Field Values
Constructor Detail

IlrAssignment

public IlrAssignment(IlrAssignable assignable,
                     IlrValue value)
Constructs a assignment using an assignable and a value. The assignment is a simple assignment.

Parameters:
assignable - An assignable object.
value - The right-hand side value of the assignment.

IlrAssignment

public IlrAssignment(int kind,
                     IlrAssignable assignable,
                     IlrValue value)
Constructs a assignment using a specific assignment operator, an assignable and a value.

Parameters:
kind - The kind of assignment operator. Its value must be one of the constant values defined in this class.
assignable - An assignable object.
value - The right-hand side value of the assignment.
Method Detail

getKind

public final int getKind()
Gets the assignment operator. Its value is one of the constant values defined in this class.

Returns:
The assignment operator.

setKind

public final void setKind(int kind)
Sets the assignment operator to be the one passed as the argument.

Parameters:
kind - The assignment operator set to this assignment. Its value is one of the constant values defined in this class.

getAssignable

public final IlrAssignable getAssignable()
Gets the assigned field value.

Returns:
The assigned field value.

getValue

public final IlrValue getValue()
Gets the right-hand side value of this assignment.

Returns:
The right-hand side value of this assignment.

setValue

public final void setValue(IlrValue value)
Sets the right-hand side value of this assignment.

Parameters:
value - The right-hand side value of this assignment.

getOperator

public IlrBinaryOperator getOperator()
Gets an evaluator in the case of an operator assignment, and returns null if the assignment is not good or if the assignment is a simple assignment.


exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
This methods explores a statement using a factory explorer.

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