Rule Execution Server API

ilog.rules.factory
Interface IlrBinaryTester

All Superinterfaces:
Serializable

public interface IlrBinaryTester
extends Serializable

A binary tester for performing tests involving two values. Internally, each time an object of the class IlrBinaryTest is created, a binary tester is determined and attached to that object. The evaluate method can then be used to perform the test operation.

See Also:
IlrBinaryTest

Field Summary
static int EQUAL
          An equality test between two values.
static int GREATER_OR_EQUAL
          The first value is tested to be greater than or equal to the second value.
static int GREATER_THAN
          The first value is tested to be greater than the second value.
static int IN
          The first value is tested to be contained by the second value.
static int LESS_OR_EQUAL
          The first value is tested to be less than or equal to the second value.
static int LESS_THAN
          The first value is tested to be less than the second value.
static int MATCH
          The first value (rule property) is tested to match (be equal to) the second value.
static int MATCH_DOWN
          The first value (rule property) is tested to be in the path formed from the second value to the hierarchy leaves.
static int MATCH_UP
          The first value (rule property) is tested to be in the path formed from the hierarchy root to the second value.
static int MATCH_UPDOWN
          The first value (rule property) is tested to either match up or match down the second value.
static int NOT_EQUAL
          A nonequality test between two values.
static int NOT_IN
          The first value is tested to be not contained by the second value.
 
Method Summary
 boolean evaluate(Object arg1, Object arg2)
          Performs the test operation.
 int getKind()
          Gets the kind of the binary test.
 

Field Detail

EQUAL

static final int EQUAL
An equality test between two values.

See Also:
Constant Field Values

NOT_EQUAL

static final int NOT_EQUAL
A nonequality test between two values.

See Also:
Constant Field Values

GREATER_THAN

static final int GREATER_THAN
The first value is tested to be greater than the second value.

See Also:
Constant Field Values

GREATER_OR_EQUAL

static final int GREATER_OR_EQUAL
The first value is tested to be greater than or equal to the second value.

See Also:
Constant Field Values

LESS_THAN

static final int LESS_THAN
The first value is tested to be less than the second value.

See Also:
Constant Field Values

LESS_OR_EQUAL

static final int LESS_OR_EQUAL
The first value is tested to be less than or equal to the second value.

See Also:
Constant Field Values

IN

static final int IN
The first value is tested to be contained by the second value.

See Also:
Constant Field Values

NOT_IN

static final int NOT_IN
The first value is tested to be not contained by the second value.

See Also:
Constant Field Values

MATCH

static final int MATCH
The first value (rule property) is tested to match (be equal to) the second value.

See Also:
Constant Field Values

MATCH_UP

static final int MATCH_UP
The first value (rule property) is tested to be in the path formed from the hierarchy root to the second value.

See Also:
Constant Field Values

MATCH_DOWN

static final int MATCH_DOWN
The first value (rule property) is tested to be in the path formed from the second value to the hierarchy leaves.

See Also:
Constant Field Values

MATCH_UPDOWN

static final int MATCH_UPDOWN
The first value (rule property) is tested to either match up or match down the second value.

See Also:
Constant Field Values
Method Detail

getKind

int getKind()
Gets the kind of the binary test. The kind of the test is defined by the integer constants of this interface.

Returns:
The kind of the binary test.

evaluate

boolean evaluate(Object arg1,
                 Object arg2)
Performs the test operation. It takes two values as arguments and returns a Boolean value as the result. If the arguments are of primitive types, they should be wrapped using their respective wrapping class to use this method. If the result is a primitive type, it is also wrapped using the corresponding wrapping type.

Parameters:
arg1 - The first argument of the operation.
arg2 - The second argument of the operation.
Returns:
A Boolean value, the result of the test operation.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013