ilog.rules.factory

Class IlrIfStatement

  • All Implemented Interfaces:
    ilog.rules.factory.IlrSourceElement, IlrStatement, java.io.Serializable


    public final class IlrIfStatement
    extends IlrStatementBlock
    This class represents an if statement 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
    • Constructor Detail

      • IlrIfStatement

        public IlrIfStatement(IlrTest test,
                      IlrStatement[] statements)
        Constructs an if statement containing only an if statement block. There is no else part attached to the statement.
        Parameters:
        test - The test to perform.
        statements - The statements to execute when the test is true. This parameter can be null. In this case, it represents an empty block.
      • IlrIfStatement

        public IlrIfStatement(IlrTest test,
                      IlrStatement[] statements,
                      IlrIfStatement.ElseBlock elseBlock)
        Constructs an if statement containing initially the an if block and an else block.
        Parameters:
        test - The test to perform.
        statements - The statements to execute when the test is true. This parameter can be null. In this case, it represents an empty block.
        elseBlock - The statements to execute when the test is false. A null parameter denotes the absence of the else block.
    • Method Detail

      • getTest

        public IlrTest getTest()
        Returns the test of this statement.
        Returns:
        An IlrTest representing the test.
      • getElseBlock

        public IlrIfStatement.ElseBlock getElseBlock()
        Returns the else block of this statement.
        Returns:
        An ElseBlock representing the else block, or null if there is no else block.
      • exploreStatement

        public java.lang.Object exploreStatement(IlrFactoryExplorer explorer)
        This method explores the if statement 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

© Copyright IBM Corp. 1987, 2017