Interface IEnumeratingLoop

  • All Superinterfaces:
    IRuleBlock
    All Known Implementing Classes:
    ForStatement, MapExpression

    public interface IEnumeratingLoop
    extends IRuleBlock
    Defines the internal interface of an enumerating loop.
    Author:
    Holger Eichelberger
    • Method Detail

      • getExpression

        Expression getExpression()
        Returns the iterator expression.
        Returns:
        the iterator expression
      • getVariablesCount

        int getVariablesCount()
        Returns the number of variables defined for this map statement.
        Returns:
        the number of variables
      • getVariable

        VariableDeclaration getVariable​(int index)
        Returns the specified variable.
        Parameters:
        index - the 0-based index denoting the variable to be returned
        Returns:
        the specified variable
        Throws:
        java.lang.IndexOutOfBoundsException - in case that index < 0 || index >=getVariablesCount()
      • getGivenType

        TypeDescriptor<?> getGivenType​(int index)
        Returns the specified given type (further specifying to getVariable(int)).
        Parameters:
        index - the 0-based index denoting the type to be returned
        Returns:
        the specified type, may be null if not given
        Throws:
        java.lang.IndexOutOfBoundsException - in case that index < 0 || index >=getVariablesCount()
      • determinesResult

        IRuleElement determinesResult()
        Returns the body element which determines the result.
        Returns:
        the rule element determining the result (may be null if there is none)
      • getElementName

        java.lang.String getElementName()
        Returns the name of the VIL language element.
        Returns:
        the name
      • isColonSeparator

        boolean isColonSeparator()
        Returns whether the given separator was a colon.
        Returns:
        true it it was a colon, else if it was an equals character