ilog.rules.brl.translation

Class IlrBlockActionStatement

  • All Implemented Interfaces:
    IlrNamedStatement, java.io.Serializable


    public class IlrBlockActionStatement
    extends IlrActionStatement
    Defines actions that can contain other actions. The only predefined block action kind is the for each loop.

    If you want to add a new kind of block action, use a kind starting from constant CUSTOM_EXTENSION.

    See Also:
    Serialized Form
    • Field Detail

      • FOR_EACH

        public static final int FOR_EACH
        Constant for the for each loop action statement (value is 0).
        See Also:
        Constant Field Values
      • CUSTOM_EXTENSION

        public static final int CUSTOM_EXTENSION
        Constant for extending the kind of block statements (value is 10).
        See Also:
        Constant Field Values
    • Constructor Detail

      • IlrBlockActionStatement

        public IlrBlockActionStatement(IlrSyntaxTree.Node node)
        Creates a new block statement with a given Abstract Syntax Tree node.
        Parameters:
        node - The Abstract Syntax Tree node.
    • Method Detail

      • addAction

        public void addAction(IlrActionStatement action)
        Adds an IlrActionStatement to this block action.
        Parameters:
        action - The action statement.
      • getAction

        public IlrActionStatement getAction(int index)
        Gets the action statement stored at index i.
        Parameters:
        index - The index.
        Returns:
        The action statement at index i, or null.
      • actionsCount

        public int actionsCount()
        Returns the number of action statements contained in this block action.
        Returns:
        The number of action statements contained in this block action.
      • setKind

        public void setKind(int kind)
        Sets the kind of this block action statement.
        Parameters:
        kind - The kind of block action statement.
      • getKind

        public int getKind()
        Gets the kind of this block action statement.
        Returns:
        The kind of this block action statement.

© Copyright IBM Corp. 1987, 2017