ui.controller

## Class MultiPurposeController

- java.lang.Object
- - ui.controller.MultiPurposeController

-     public class MultiPurposeController
      extends java.lang.Object

  Controller for Multiple Purposes.
  Author:
    Gruppe14

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiPurposeController(Model model)` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T,Integer> java.util.HashMap<T,Integer>` | `copyHashMap(java.util.HashMap<T,Integer> map)` Copies a HashMap into a new One.
    `<T> void` | `decIdx(T key, java.util.HashMap<T,java.lang.Integer> map)` Decrement the Indices if a Key as been removed.
    `AbstractCpsObject` | `searchByID(int id)` Search for Object by ID.
    `Category` | `searchCat(java.lang.String category)` search for category.
    `AbstractCpsObject` | `searchCatObj(Category category, java.lang.String object)` Search for Object in a Category.
    `CpsEdge` | `searchEdge(int a, int b)` Search Edge between 2 Objects.
    `HolonElement` | `searchEle(HolonObject object, java.lang.String element)` Search for Element.
    `HolonElement` | `searchEleById(HolonObject object, int idEle)` Search the Element by ID.

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

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

- - ### Constructor Detail

    - #### MultiPurposeController

          public MultiPurposeController(Model model)

      Constructor.
      Parameters:
        `model` - Model

  - ### Method Detail

    - #### searchCat

          public Category searchCat(java.lang.String category)

      search for category.
      Parameters:
        `category` - name of the Category
      Returns:
        the Category

    - #### searchCatObj

          public AbstractCpsObject searchCatObj(Category category,
                                                java.lang.String object)

      Search for Object in a Category.
      Parameters:
        `category` - name of the Category
        `object` - Name of the Object
      Returns:
        The Object

    - #### searchByID

          public AbstractCpsObject searchByID(int id)

      Search for Object by ID.
      Parameters:
        `id` - the ID of the Object
      Returns:
        the CpsObject

    - #### searchEle

          public HolonElement searchEle(HolonObject object,
                                        java.lang.String element)

      Search for Element.
      Parameters:
        `object` - the Holon Object
        `element` - name of the Element
      Returns:
        the Holon Element

    - #### searchEleById

          public HolonElement searchEleById(HolonObject object,
                                            int idEle)

      Search the Element by ID.
      Parameters:
        `object` - the Holon Object
        `idEle` - the Element ID
      Returns:
        The Holon Element

    - #### searchEdge

          public CpsEdge searchEdge(int a,
                                    int b)

      Search Edge between 2 Objects.
      Parameters:
        `a` - ID of Object a
        `b` - ID of Object b
      Returns:
        The Edge

    - #### decIdx

          public <T> void decIdx(T key,
                                 java.util.HashMap<T,java.lang.Integer> map)

      Decrement the Indices if a Key as been removed.
      Type Parameters:
        `T` - key type
      Parameters:
        `key` - the Key
        `map` - the Map

    - #### copyHashMap

          public static <T,Integer> java.util.HashMap<T,Integer> copyHashMap(java.util.HashMap<T,Integer> map)

      Copies a HashMap into a new One.
      Type Parameters:
        `T` - type
      Parameters:
        `map` - the HashMap
      Returns:
        Copy of the HashMap