Class ZestLoopInteger

    • Constructor Detail

      • ZestLoopInteger

        public ZestLoopInteger()
        Instantiates a new zest loop integer.
      • ZestLoopInteger

        public ZestLoopInteger​(String name)
        Instantiates a new zest loop integer.
        Parameters:
        name - the name of the loop
      • ZestLoopInteger

        public ZestLoopInteger​(String name,
                               int start,
                               int end)
        Instantiates a new zest loop integer.
        Parameters:
        name - the name of the loop
        start - the start index
        end - the end index
      • ZestLoopInteger

        public ZestLoopInteger​(int index,
                               int start,
                               int end)
        Instantiates a new zest loop integer.
        Parameters:
        index - the index of the statement
        start - the start index
        end - the end index
      • ZestLoopInteger

        public ZestLoopInteger​(int start,
                               int end)
        Instantiates a new zest loop integer.
        Parameters:
        start - the start index
        end - the end index
    • Method Detail

      • getStart

        public int getStart()
        Gets the start index.
        Returns:
        the start index
      • getEnd

        public int getEnd()
        Gets the end index.
        Returns:
        the end index
      • setStep

        public void setStep​(int step)
        sets the step for the loop
        Parameters:
        step - the step for this loop
      • getStep

        public int getStep()
        returns the step of this loop
        Returns:
        the step of this loop
      • isLastState

        public boolean isLastState()
        Description copied from class: ZestLoop
        checks if the loop is on its last state
        Specified by:
        isLastState in class ZestLoop<Integer>
        Returns:
        true if the loop is over
      • toLastState

        public void toLastState()
        Description copied from class: ZestLoop
        ends the loop taking its current state to the last state
        Specified by:
        toLastState in class ZestLoop<Integer>
      • getCurrentToken

        public Integer getCurrentToken()
        Description copied from class: ZestLoop
        return the current token considered inside the loop.
        Overrides:
        getCurrentToken in class ZestLoop<Integer>
        Returns:
        the current token considered inside the loop
      • loop

        public boolean loop()
      • endLoop

        public void endLoop()
      • setStart

        public void setStart​(int newStart)
        sets a new start index
        Parameters:
        newStart - the new start index
      • setEnd

        public void setEnd​(int newEnd)
        sets the new end index
        Parameters:
        newEnd - the new end index