Rule Execution Server API

ilog.rules.factory
Class IlrValue

java.lang.Object
  extended by ilog.rules.factory.IlrValue
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IlrArrayElement, IlrArrayLength, IlrAsValue, IlrBinaryValue, IlrCastValue, IlrClassTypeValue, IlrCollectInSourceValue, IlrConstantValue, IlrContextValue, IlrEventTimeValue, IlrFieldValue, IlrInstanceValue, IlrIntervalValue, IlrNaryValue, IlrObjectValue, IlrPropertyAccessValue, IlrScopeValue, IlrStaticFieldValue, IlrTestValue, IlrUnaryValue, IlrVariable

public abstract class IlrValue
extends Object
implements Serializable

This abstract class represents a value of the rule language. Any expression in the rule language is a value.

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

Method Summary
 IlrBinaryValue add(IlrValue value)
          Creates a value to represent the expression this + value.
 IlrBinaryValue divide(IlrValue value)
          Creates a value to represent the expression this / value.
abstract  Object exploreValue(IlrFactoryExplorer explorer)
          Explores this value using a factory explorer and returns an object to represent the result of the exploration.
 IlrFieldValue getField(String fieldName)
          Creates a value to represent a field value of this object.
 IlrReflect getReflect()
          Gets the reflect object of this value.
 Class getType()
          Deprecated. Replaced by getXOMType()
 IlrType getXOMType()
          Gets the class type of this value.
 IlrMethodInvocation invokeEquals(IlrValue arg)
          Creates an IlrMethodInvocation object representing the invocation of the equals method on this value.
 boolean isConstant()
          Tests whether this value is a constant value, that is, an instance of the subclass IlrConstantValue.
 boolean isEvent()
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 boolean isEventCondition()
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 boolean isNull()
          Tests whether this value represents the null object.
 IlrBinaryValue multiply(IlrValue value)
          Creates a value to represent the expression this * value.
 IlrBinaryValue remainder(IlrValue value)
          Creates a value to represent the expression this % value.
 IlrBinaryValue subtract(IlrValue value)
          Creates a value to represent the expression this - value.
 IlrAfterTest testAfter(IlrValue otherEvent)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrAfterTest testAfter(IlrValue otherEvent, IlrValue lowerBound, IlrValue upperBound)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrBeforeTest testBefore(IlrValue otherEvent)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrBeforeTest testBefore(IlrValue otherEvent, IlrValue lowerBound, IlrValue upperBound)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrBinaryTest testEqual(IlrValue arg)
          Creates a test to represent this value tested to be equal to the value passed as the argument.
 IlrNotTest testFalse()
          Creates a test to represent this value tested to be false.
 IlrBinaryTest testGreaterOrEqual(IlrValue arg)
          Creates a test to represent this value tested to be greater than or equal to the value passed as the argument.
 IlrBinaryTest testGreaterThan(IlrValue arg)
          Creates a test to represent this value tested to be greater than the value passed as the argument.
 IlrBinaryTest testIn(IlrValue arg)
          Creates a test to represent this value tested to be contained in the value passed as the argument.
 IlrInstanceOfTest testInstanceOf(IlrClassTypeValue arg)
          Creates a test to represent this value tested to be an instance of the value passed as the argument.
 IlrBinaryTest testLessOrEqual(IlrValue arg)
          Creates a test to represent this value tested to be less than or equal to the value passed as the argument.
 IlrBinaryTest testLessThan(IlrValue arg)
          Creates a test to represent this value tested to be less than the value passed as the argument.
 IlrBinaryTest testNotEqual(IlrValue arg)
          Creates a test to represent this value tested to be not equal to the value passed as the argument.
 IlrBinaryTest testNotIn(IlrValue arg)
          Creates a test to represent this value tested to be not contained in the value passed as the argument.
 IlrOccursinTest testOccursin(IlrValue lowerBound, IlrValue upperBound)
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrUnaryTest testTrue()
          Creates a test to represent this value tested to be true.
 IlrEventTimeValue timeof()
          Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.
 IlrUnaryValue toNegative()
          Creates a value to represent the expression -this.
 IlrUnaryValue toPositive()
          Creates a value to represent the expression +this.
 IlrUnaryValue toPostfixDecr()
          Creates a value to represent the expression this--.
 IlrUnaryValue toPostfixIncr()
          Creates a value to represent the expression this++.
 IlrUnaryValue toPrefixDecr()
          Creates a value to represent the expression --this.
 IlrUnaryValue toPrefixIncr()
          Creates a value to represent the expression ++this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getReflect

public final IlrReflect getReflect()
Gets the reflect object of this value.

Returns:
The reflect object.

isConstant

public final boolean isConstant()
Tests whether this value is a constant value, that is, an instance of the subclass IlrConstantValue.

Returns:
true if this value is constant. Otherwise, it returns false.

isNull

public final boolean isNull()
Tests whether this value represents the null object. The value null is represented by the constant object IlrFactoryConstants.NULL, so this method checks the equality to this constant object.

Returns:
true if this value is null. Otherwise, it returns false.

getField

public final IlrFieldValue getField(String fieldName)
Creates a value to represent a field value of this object.

Parameters:
fieldName - The name of the field.
Returns:
A field value.

invokeEquals

public final IlrMethodInvocation invokeEquals(IlrValue arg)
Creates an IlrMethodInvocation object representing the invocation of the equals method on this value.

Parameters:
arg - The argument of the equals method.
Returns:
A method invocation.

toPositive

public final IlrUnaryValue toPositive()
Creates a value to represent the expression +this. This operation does not change the value, but creates another value to represent the + this expression.

Returns:
An expression value.

toNegative

public final IlrUnaryValue toNegative()
Creates a value to represent the expression -this.

Returns:
An expression value.

toPrefixIncr

public final IlrUnaryValue toPrefixIncr()
Creates a value to represent the expression ++this.

Returns:
An expression value.

toPrefixDecr

public final IlrUnaryValue toPrefixDecr()
Creates a value to represent the expression --this.

Returns:
An expression value.

toPostfixIncr

public final IlrUnaryValue toPostfixIncr()
Creates a value to represent the expression this++.

Returns:
An expression value.

toPostfixDecr

public final IlrUnaryValue toPostfixDecr()
Creates a value to represent the expression this--.

Returns:
An expression value.

add

public final IlrBinaryValue add(IlrValue value)
Creates a value to represent the expression this + value.

Parameters:
value - The second value.
Returns:
An expression value.

subtract

public final IlrBinaryValue subtract(IlrValue value)
Creates a value to represent the expression this - value.

Parameters:
value - The second value.
Returns:
An expression value.

multiply

public final IlrBinaryValue multiply(IlrValue value)
Creates a value to represent the expression this * value.

Parameters:
value - The second value.
Returns:
An expression value.

divide

public final IlrBinaryValue divide(IlrValue value)
Creates a value to represent the expression this / value.

Parameters:
value - The second value.
Returns:
An expression value.

remainder

public final IlrBinaryValue remainder(IlrValue value)
Creates a value to represent the expression this % value.

Parameters:
value - The second value.
Returns:
An expression value.

isEventCondition

public boolean isEventCondition()
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Returns whether this value is, or is bound to, the result of a condition, and this condition is an event condition.

Returns:
true if this value is, or is bound to, the result of an event condition, and false otherwise.

isEvent

public final boolean isEvent()
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Returns whether this value is an object asserted as an event, or is an object that, if asserted, would be asserted as an event.

Returns:
true if this value is an event, and false otherwise.

timeof

public final IlrEventTimeValue timeof()
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates a value to represent the expression timeof(this). It returns null if this value is not an event.

Returns:
A value for a timeof expression, when allowed; and null otherwise.

testOccursin

public final IlrOccursinTest testOccursin(IlrValue lowerBound,
                                          IlrValue upperBound)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates an occursin test, testing that the event corresponding to this value has occurred in the given time interval. It returns null if this value is not an event.

Parameters:
lowerBound - The minimal value for the event occurrence time, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no minimum and is thus equivalent to minus infinity.
upperBound - The maximal value for the event occurrence time, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no maximum and is thus equivalent to plus infinity.
Returns:
An occursin test, when allowed; and null otherwise.

testBefore

public final IlrBeforeTest testBefore(IlrValue otherEvent,
                                      IlrValue lowerBound,
                                      IlrValue upperBound)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates a before test, testing that the events corresponding to this value and the given other value have occurred with a delay included in the given time interval. Returns null if this value, or the other given value, is not an event.

Parameters:
otherEvent - The value corresponding to the event occurring after this one.
lowerBound - The minimal delay between the event occurrence times, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no minimum and is thus equivalent to minus infinity.
upperBound - The maximal delay between the event occurrence times, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no maximum and is thus equivalent to plus infinity.
Returns:
A before test, when allowed; and null otherwise.

testBefore

public final IlrBeforeTest testBefore(IlrValue otherEvent)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates a before test, testing that the event corresponding to this value has occurred before the event corresponding to the given other value. It returns null if this value, or the other given value, is not an event.

Parameters:
otherEvent - The value corresponding to the event occurring after this one.
Returns:
A before test, when allowed; and null otherwise.

testAfter

public final IlrAfterTest testAfter(IlrValue otherEvent,
                                    IlrValue lowerBound,
                                    IlrValue upperBound)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates an after test, testing that the events corresponding to this value and the given other value have occurred with a delay included in the given time interval. It returns null if this value, or the other given value, is not an event.

Parameters:
otherEvent - The value corresponding to the event occurring before this one.
lowerBound - The minimal delay between the event occurrence times, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no minimum and is thus equivalent to minus infinity.
upperBound - The maximal delay between the event occurrence times, inclusive, for the test to be satisfied. An IlrValue evaluating to null means that there is no maximum and is thus equivalent to plus infinity.
Returns:
An after test, when allowed; and null otherwise.

testAfter

public final IlrAfterTest testAfter(IlrValue otherEvent)
Deprecated. As of IBM Decision Server 7.5, event processing is deprecated.

Creates an after test, testing that the event corresponding to this value has occurred after the event corresponding to the given other value. It returns null if this value, or the other given value, is not an event.

Parameters:
otherEvent - The value corresponding to the event occurring before this one.
Returns:
An after test, when allowed; and null otherwise.

testTrue

public final IlrUnaryTest testTrue()
Creates a test to represent this value tested to be true.

Returns:
A unary test.

testFalse

public final IlrNotTest testFalse()
Creates a test to represent this value tested to be false.

Returns:
A not test.

testEqual

public final IlrBinaryTest testEqual(IlrValue arg)
Creates a test to represent this value tested to be equal to the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testNotEqual

public final IlrBinaryTest testNotEqual(IlrValue arg)
Creates a test to represent this value tested to be not equal to the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testGreaterThan

public final IlrBinaryTest testGreaterThan(IlrValue arg)
Creates a test to represent this value tested to be greater than the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testGreaterOrEqual

public final IlrBinaryTest testGreaterOrEqual(IlrValue arg)
Creates a test to represent this value tested to be greater than or equal to the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testLessThan

public final IlrBinaryTest testLessThan(IlrValue arg)
Creates a test to represent this value tested to be less than the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testLessOrEqual

public final IlrBinaryTest testLessOrEqual(IlrValue arg)
Creates a test to represent this value tested to be less than or equal to the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testInstanceOf

public final IlrInstanceOfTest testInstanceOf(IlrClassTypeValue arg)
Creates a test to represent this value tested to be an instance of the value passed as the argument.

Parameters:
arg - A class type value.
Returns:
An instanceof test.

testIn

public final IlrBinaryTest testIn(IlrValue arg)
Creates a test to represent this value tested to be contained in the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

testNotIn

public final IlrBinaryTest testNotIn(IlrValue arg)
Creates a test to represent this value tested to be not contained in the value passed as the argument.

Parameters:
arg - The second argument of the binary test.
Returns:
A binary test.

getType

public final Class getType()
Deprecated. Replaced by getXOMType()

Gets the class type of this value. If the type returned by this method is null, it means that this value is not well formed, and the type of the value cannot be inferred.

Returns:
The class type of this value, or null if this value is not well formed.

getXOMType

public final IlrType getXOMType()
Gets the class type of this value. If the type returned by this method is null, it means that this value is not well formed, and the type of the value cannot be inferred.

Returns:
The class type of this value, or null if this value is not well formed.

exploreValue

public abstract Object exploreValue(IlrFactoryExplorer explorer)
Explores this value using a factory explorer and returns an object to represent the result of the exploration. This method invokes one of the exploreValue methods of the factory explorer according to the concrete type of this value. In cases of expressions, it invokes one of the exploreExpression methods of the explorer.

Parameters:
explorer - The factory explorer used to explore this value.
Returns:
An object.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2012