org.licas.autonomic.script

## Class LoopStack

- java.lang.Object
- - org.licas.autonomic.script.LoopStack

-     public class LoopStack
      extends java.lang.Object

  This is a stack that stores script loop evaluators, from a While loop.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoopStack()` Create a new instance of LoopStack.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addControlLoop(AutoEngineInfo autoInfo)` Add the control loop element if not already on the stack.
    `protected boolean` | `isEmpty()` Return true if the loop stack is empty.
    `protected AutoEngineInfo` | `peek()` Looks at the object at the top of this stack without removing it from the stack.
    `protected java.lang.Object` | `pop()` Removes the object at the top of this stack and returns that object as the value of this function.
    `protected void` | `popLastLoop(java.lang.String internalID)` Pop the last control loop element, if the internal ID matches.
    `protected void` | `push(AutoEngineInfo item)` Pushes an item onto the top of this stack.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LoopStack

          public LoopStack()

      Create a new instance of LoopStack.

  - ### Method Detail

    - #### isEmpty

          protected boolean isEmpty()

      Return true if the loop stack is empty.
      Returns:
        true if no element on the stack.

    - #### pop

          protected java.lang.Object pop()

      Removes the object at the top of this stack and returns that object as the value of this function.
      Returns:
        the object at the top of this stack.

    - #### peek

          protected AutoEngineInfo peek()

      Looks at the object at the top of this stack without removing it from the stack.
      Returns:
        the object at the top of this stack.

    - #### push

          protected void push(AutoEngineInfo item)

      Pushes an item onto the top of this stack.
      Parameters:
        `item` - the object to add.

    - #### addControlLoop

          protected void addControlLoop(AutoEngineInfo autoInfo)

      Add the control loop element if not already on the stack.
      Parameters:
        `autoInfo` - the info element to add.

    - #### popLastLoop

          protected void popLastLoop(java.lang.String internalID)

      Pop the last control loop element, if the internal ID matches.
      Parameters:
        `internalID` - internal ID of the element last evaluated.