classes

## Class HolonSwitch

- java.lang.Object
- - classes.AbstractCpsObject
  - - classes.HolonSwitch

-     public class HolonSwitch
      extends AbstractCpsObject

  The class HolonSwitch represents a Switch, which can be turned on and off.
  Author:
    Gruppe14

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HolonSwitch(AbstractCpsObject obj)` Create a copy of an existing HolonSwitch.
    `HolonSwitch(java.lang.String objName)` Create a new HolonSwitch with the default name ("Switch"), a default value of automatic handle and active status.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean[]` | `getActiveAt()` All values of the graph for the selected Switch (only auto-Mode) get the activeAt Array.
    `boolean` | `getActiveManual()` Returns the ManualState.
    `java.util.LinkedList<java.awt.Point>` | `getGraphPoints()` For automatic use only (throught the graph).
    `boolean` | `getManualMode()` Get manualmode state.
    `boolean` | `getState()` Overall status of the switch (manual or automatic mode).
    `boolean` | `getState(int timeStep)` Getter for the status of the Switch at a given timestep.
    `void` | `setActiveAt(boolean active)` Set the value of the Switch.
    `void` | `setAutoState(boolean state)` Set the state of the Switch to automatic.
    `void` | `setGraphPoints(java.util.LinkedList<java.awt.Point> points)` Set the values of the switch in the graph (auto. mode only).
    `void` | `setManualMode(boolean mode)` Set the overall value of the Switch (manual mode).
    `void` | `setManualState(boolean state)` Change the state of the Switch to manual.
    `void` | `switchState()` Calculates the state of the Switch.

    - ### Methods inherited from class classes.AbstractCpsObject

      `addConnection, addPseudoTag, addTag, getBorderColor, getConnectedTo, getConnections, getID, getImage, getName, getObjName, getPosition, getPseudoTags, getSav, getTag, resetTags, setBorderColor, setConnections, setID, setImage, setName, setObjName, setPosition, setPosition, setPseudoTags, setSav, setTags`

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

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

- - ### Constructor Detail

    - #### HolonSwitch

          public HolonSwitch(java.lang.String objName)

      Create a new HolonSwitch with the default name ("Switch"), a default value of automatic handle and active status.
      Parameters:
        `objName` - String

    - #### HolonSwitch

          public HolonSwitch(AbstractCpsObject obj)

      Create a copy of an existing HolonSwitch.
      Parameters:
        `obj` - the Object to copy

  - ### Method Detail

    - #### switchState

          public void switchState()

      Calculates the state of the Switch.

    - #### getState

          public boolean getState(int timeStep)

      Getter for the status of the Switch at a given timestep.
      Parameters:
        `timeStep` - int
      Returns:
        state value

    - #### getState

          public boolean getState()

      Overall status of the switch (manual or automatic mode).
      Returns:
        boolean the State

    - #### setManualState

          public void setManualState(boolean state)

      Change the state of the Switch to manual.
      Parameters:
        `state` - the State

    - #### setAutoState

          public void setAutoState(boolean state)

      Set the state of the Switch to automatic.
      Parameters:
        `state` - the State

    - #### getGraphPoints

          public java.util.LinkedList<java.awt.Point> getGraphPoints()

      For automatic use only (throught the graph).
      Returns:
        the Graph Points

    - #### setGraphPoints

          public void setGraphPoints(java.util.LinkedList<java.awt.Point> points)

      Set the values of the switch in the graph (auto. mode only).
      Parameters:
        `points` - the Graph points

    - #### getActiveAt

          public boolean[] getActiveAt()

      All values of the graph for the selected Switch (only auto-Mode) get the activeAt Array.
      Returns:
        boolean[] the States of each Iteration

    - #### getActiveManual

          public boolean getActiveManual()

      Returns the ManualState.
      Returns:
        boolean Manual State

    - #### setActiveAt

          public void setActiveAt(boolean active)

      Set the value of the Switch.
      Parameters:
        `active` - the default value

    - #### setManualMode

          public void setManualMode(boolean mode)

      Set the overall value of the Switch (manual mode).
      Parameters:
        `mode` - the mode (boolean)

    - #### getManualMode

          public boolean getManualMode()

      Get manualmode state.
      Returns:
        boolean manual mode state