Commit 435deac1 authored by Nico Mack's avatar Nico Mack

Added static ApplicationContext class

parent 7b964a6b
package lu.list.itis.dkd.tui.utility;
import java.util.HashMap;
import java.util.Map;
import lu.list.itis.dkd.tui.cps.variable.Variable;
//***************************************************************************
//* Class Definition and Members *
//***************************************************************************
public class ApplicationContext {
private static Map <String,Variable<?>> context = new HashMap<>();
// ---------------------------------------------------------------------------
// ***************************************************************************
// * Constructor(s)
// ***************************************************************************
// ---------------------------------------------------------------------------
private ApplicationContext() {
}
// ---------------------------------------------------------------------------
// ***************************************************************************
// * Class Body
// ***************************************************************************
// ---------------------------------------------------------------------------
public static void addAll (Map <String,Variable<?>> variables) {
context.putAll(variables);
}
// ---------------------------------------------------------------------------
public static Map <String,Variable<?>> getContext() {
return context;
}
// ---------------------------------------------------------------------------
public static Variable<?> getVariable (String identifier) {
return context.get(identifier);
}
// ---------------------------------------------------------------------------
// ***************************************************************************
// * End of Class
// ***************************************************************************
// ---------------------------------------------------------------------------
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment