public class MultiPurposeController
extends java.lang.Object
| Constructor and Description |
|---|
MultiPurposeController(Model model)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <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.
|
public MultiPurposeController(Model model)
model - Modelpublic Category searchCat(java.lang.String category)
category - name of the Categorypublic AbstractCpsObject searchCatObj(Category category, java.lang.String object)
category - name of the Categoryobject - Name of the Objectpublic AbstractCpsObject searchByID(int id)
id - the ID of the Objectpublic HolonElement searchEle(HolonObject object, java.lang.String element)
object - the Holon Objectelement - name of the Elementpublic HolonElement searchEleById(HolonObject object, int idEle)
object - the Holon ObjectidEle - the Element IDpublic CpsEdge searchEdge(int a, int b)
a - ID of Object ab - ID of Object bpublic <T> void decIdx(T key,
java.util.HashMap<T,java.lang.Integer> map)
T - key typekey - the Keymap - the Mappublic static <T,Integer> java.util.HashMap<T,Integer> copyHashMap(java.util.HashMap<T,Integer> map)
T - typemap - the HashMap