Rule Execution Server API

ilog.rules.factory
Class IlrUnaryValue

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

public class IlrUnaryValue
extends IlrValue
implements IlrStatement

This class represents a unary expression of the rule language. A unary expression transforms a value with a certain type to another value of another type. The operation is performed by a IlrUnaryOperator, which is determined using the type of the argument and the kind of operation. The method getOperator() returns that operator. If this method returns null, it means that the cast expression is not valid.

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
IlrUnaryValue(int kind, IlrValue argument)
          Constructs a unary expression from the value passed as an argument.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores this method as a statement using a factory explorer and returns an object as a result.
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores the unary value using a factory explorer and returns an object as a result.
 IlrValue getArgument()
          Gets the argument of this expression.
 int getKind()
          Gets the kind of the expression.
 IlrUnaryOperator getOperator()
          Determines and returns the unary operator used to perform the operation.
 void setArgument(IlrValue argument)
          Changes the argument of this expression.
 void setKind(int kind)
          Sets the kind 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

IlrUnaryValue

public IlrUnaryValue(int kind,
                     IlrValue argument)
Constructs a unary expression from the value passed as an argument.

Parameters:
kind - The type of the unary expression, as defined in IlrUnaryOperator.
argument - The argument value.
Method Detail

getKind

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

Returns:
The kind of this expression.

setKind

public void setKind(int kind)
Sets the kind of this expression.

Parameters:
kind - The kind of this expression. The possible values are defined in IlrUnaryOperator.

getArgument

public IlrValue getArgument()
Gets the argument of this expression.

Returns:
The argument of this expression.

setArgument

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

Parameters:
argument - The argument of this expression.

getOperator

public IlrUnaryOperator getOperator()
Determines and returns the unary operator used to perform the operation. If this method returns null, the unary operation is not valid.

Returns:
A unary operator, or null if the unary operation is not valid.

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores the unary 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.

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores this method as a statement using a factory explorer and returns an object as a result.

Specified by:
exploreStatement in interface IlrStatement
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