Interface IRuleBlock

    • Method Detail

      • getBodyElementCount

        int getBodyElementCount()
        Get the number of body elements of this rule.
        Returns:
        The number of body elements of this rule.
      • getBodyElement

        IRuleElement getBodyElement​(int index)
        Get the element of this rule at the specified index.
        Parameters:
        index - The 0-based index of the rule element to be returned.
        Returns:
        The rule element at the given index.
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >=getBodyElementCount()
      • isVirtual

        boolean isVirtual()
        Returns whether this block is a real block or consists just of a block element without brackets.
        Returns:
        true if this block is virtual, false else
      • addBodyElement

        void addBodyElement​(int index,
                            IRuleElement element)
                     throws VilException
        Changes the given rule block. Shifts elements if necessary.
        Parameters:
        index - index at which the specified element is to be inserted
        element - the element to be inserted
        Throws:
        VilException - in case that adding the element fails
      • returnActualValue

        boolean returnActualValue()
        Returns whether this body shall return an actual value (function) or a rule execution result.
        Returns:
        true in case of an actual value, false else