ilog.rules.factory

Class IlrBinaryTest

  • All Implemented Interfaces:
    ilog.rules.factory.IlrSourceElement, IlrTest, java.io.Serializable
    Direct Known Subclasses:
    IlrPropertyMatchTest


    public class IlrBinaryTest
    extends IlrBaseTest
    This class represents a binary test of the rule language. A binary test uses two values and performs a test between those values. The kind of test is specified by the field kind. The possible values of this field are defined in IlrBinaryTester. The test itself is performed by a IlrBinaryTester, which is returned by the method getTester(). If this method returns a null object, the current binary test is not a valid test expression.

    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

      Methods 
      Modifier and Type Method and Description
      java.lang.Object exploreTest(IlrFactoryExplorer explorer)
      Explores this binary test using a factory explorer and returns an object as a result.
      IlrValue getFirstArgument()
      Gets the first argument value involved in this test.
      int getKind()
      Gets the kind of test.
      IlrValue getSecondArgument()
      Gets the second argument value involved in this test.
      IlrBinaryTester getTester()
      Determines and returns the binary tester used to perform the test.
      void setFirstArgument(IlrValue first)
      Changes the first argument value involved in this test.
      void setKind(int kind)
      Sets the kind of test.
      void setSecondArgument(IlrValue second)
      Changes the second argument value involved in this test.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrBinaryTest

        public IlrBinaryTest(int kind,
                     IlrValue first,
                     IlrValue second)
        Constructs a binary test. This test involves two values.
        Parameters:
        kind - The kind of test, as defined in IlrBinaryTester. The possible values are those between IlrBinaryTester.EQUAL and IlrBinaryTester.NOT_IN. In case an incorrect value is given, an IllegalArgumentException is thrown.
        first - The first argument value.
        second - The second argument value.
      • IlrBinaryTest

        protected IlrBinaryTest()
    • Method Detail

      • getKind

        public final int getKind()
        Gets the kind of test. The possible values are defined in IlrBinaryTester.
        Returns:
        The kind of this test.
      • setKind

        public void setKind(int kind)
        Sets the kind of test.
        Parameters:
        kind - The possible values are defined in IlrBinaryTester.
      • getFirstArgument

        public final IlrValue getFirstArgument()
        Gets the first argument value involved in this test.
        Returns:
        The first argument value involved in this test.
      • setFirstArgument

        public final void setFirstArgument(IlrValue first)
        Changes the first argument value involved in this test.
        Parameters:
        first - The first argument value involved in this test.
      • getSecondArgument

        public final IlrValue getSecondArgument()
        Gets the second argument value involved in this test.
        Returns:
        The second argument value involved in this test.
      • setSecondArgument

        public final void setSecondArgument(IlrValue second)
        Changes the second argument value involved in this test.
        Parameters:
        second - The second argument value involved in this test.
      • getTester

        public IlrBinaryTester getTester()
        Determines and returns the binary tester used to perform the test. The tester is determined using the types of the arguments and the kind of the test. If this method returns null, the test is not a valid test expression.
        Returns:
        A binary tester, or null if the test is not valid.
      • exploreTest

        public java.lang.Object exploreTest(IlrFactoryExplorer explorer)
        Explores this binary test using a factory explorer and returns an object as a result.
        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.

© Copyright IBM Corp. 1987, 2017