ilog.rules.factory

Class IlrTaskGotoNodeStatement

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


    public class IlrTaskGotoNodeStatement
    extends IlrControlNodeStatement

    This class represents the class of a jump instruction in a ruleflow. It groups three kinds of jumps that can be found in a ruleflow:

    • goto instruction
    • break instruction
    • continue instruction.

    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:
    IlrTaskFactory, IlrControlNodeStatement, IlrFlowNodeStatement, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int Break
      This value is used to give a break behavior to the jump node, used in a while block.
      static int Continue
      This value is used to give a continue behavior to the jump node, used in a while block.
      static int Goto
      This value is used to give a goto behavior to the jump node.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getGotoLabel()
      Returns the label of the node on which the goto node points.
      int getKind()
      Returns the jump node kind.
      void setGotoLabel(java.lang.String label)
      Sets the label of the node to which the ruleflow execution is directed after the execution of the goto node.
      • Methods inherited from class java.lang.Object

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

      • Goto

        public static final int Goto

        This value is used to give a goto behavior to the jump node.

        See Also:
        Constant Field Values
      • Break

        public static final int Break

        This value is used to give a break behavior to the jump node, used in a while block.

        See Also:
        Constant Field Values
      • Continue

        public static final int Continue

        This value is used to give a continue behavior to the jump node, used in a while block.

        See Also:
        Constant Field Values
    • Constructor Detail

      • IlrTaskGotoNodeStatement

        public IlrTaskGotoNodeStatement(int kind)
        Builds a jump instruction node for a ruleflow.

        We specify the kind of jump by passing one of the following values:

        • IlrTaskGotoNodeStatement.Goto
        • IlrTaskGotoNodeStatement.Break
        • IlrTaskGotoNodeStatement.Continue
        If a wrong value is passed, an IllegalArgumentException is thrown.
        Parameters:
        kind - The kind of jump node.
      • IlrTaskGotoNodeStatement

        public IlrTaskGotoNodeStatement(int kind,
                                IlrFlowNodeStatement previousNode)
        Builds a jump instruction node for a ruleflow and connects the created node to the passed node. This constructor must not be called to connect the new node to an IlrTaskIfNodeStatement nor to an IlrTaskSwitchNodeStatement; instead use IlrTaskIfNodeStatement.setTrueNode, IlrTaskIfNodeStatement.setFalseNode, IlrTaskSwitchNodeStatement.setCaseNode, or IlrTaskSwitchNodeStatement.setDefaultNode.

        We specify the kind of jump by passing one of the following values:

        • IlrTaskGotoNodeStatement.Goto
        • IlrTaskGotoNodeStatement.Break
        • IlrTaskGotoNodeStatement.Continue
        If a wrong value is passed, an IllegalArgumentException is thrown.
        Parameters:
        kind - The kind of jump node.
        previousNode - The node that is before the new node in the ruleflow. The two nodes are connected by calling the method IlrFlowNodeStatement.setNextNode.
    • Method Detail

      • setGotoLabel

        public void setGotoLabel(java.lang.String label)
        Sets the label of the node to which the ruleflow execution is directed after the execution of the goto node. This method must be used only for a goto node whose kind is Goto, or else an IllegalArgumentException is thrown.
        Parameters:
        label - The label of the node on which the goto node points.
      • getGotoLabel

        public java.lang.String getGotoLabel()
        Returns the label of the node on which the goto node points. This is the node that will be executed after the goto node.
        Returns:
        The label of the node pointed to by the this.
      • getKind

        public int getKind()
        Returns the jump node kind. The possible values are:
        • IlrTaskGotoNodeStatement.Goto
        • IlrTaskGotoNodeStatement.Break
        • IlrTaskGotoNodeStatement.Continue.
        Returns:
        The kind of the node.

© Copyright IBM Corp. 1987, 2017