Rule Execution Server API

ilog.rules.factory
Class IlrNaryTest

java.lang.Object
  extended by ilog.rules.factory.IlrBaseTest
      extended by ilog.rules.factory.IlrNaryTest
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrTest, Serializable

public class IlrNaryTest
extends IlrBaseTest

This class represents a logical test 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 AND
          This constant is used to represent a logical AND (&&) test.
static int OR
          This constant is used to represent a logical OR (||) test.
 
Constructor Summary
IlrNaryTest(int kind, IlrTest... arguments)
          Constructs a logical test of a certain type.
 
Method Summary
 void addTest(IlrTest test)
          Adds a test to the arguments of this logical test.
 Enumeration enumerateTests()
          Gets an enumeration to visit all the arguments of this logical test.
 Object exploreTest(IlrFactoryExplorer explorer)
          Explores this test using a factory explorer.
 int getKind()
          Gets the kind of this test.
 int getTestCount()
          Gets the number of arguments in this logical test.
 IlrTest[] getTests()
          Gets the arguments of this logical test.
 void removeTest(IlrTest test)
          Removes a test from the arguments of this logical test.
 void setKind(int kind)
          Sets the kind of this test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AND

public static final int AND
This constant is used to represent a logical AND (&&) test.

See Also:
Constant Field Values

OR

public static final int OR
This constant is used to represent a logical OR (||) test.

See Also:
Constant Field Values
Constructor Detail

IlrNaryTest

public IlrNaryTest(int kind,
                   IlrTest... arguments)
Constructs a logical test of a certain type.

Parameters:
kind - The type of this logical test.
Method Detail

getKind

public final int getKind()
Gets the kind of this test.

Returns:
The kind of this test. Its value is one of the constant values defined in this class.

setKind

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

Parameters:
kind - The kind of this test. Its value is one of the constant values defined in this class.

addTest

public final void addTest(IlrTest test)
Adds a test to the arguments of this logical test.

Parameters:
test - The test to be added.

removeTest

public final void removeTest(IlrTest test)
Removes a test from the arguments of this logical test.

Parameters:
test - The test to be removed.

getTestCount

public final int getTestCount()
Gets the number of arguments in this logical test.

Returns:
The number of arguments in this logical test.

getTests

public final IlrTest[] getTests()
Gets the arguments of this logical test.

Returns:
The arguments of this logical test.

enumerateTests

public final Enumeration enumerateTests()
Gets an enumeration to visit all the arguments of this logical test.

Returns:
An enumeration to visit all the arguments of this logical test.

exploreTest

public Object exploreTest(IlrFactoryExplorer explorer)
Explores this test 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