| Constructor and Description |
|---|
Env()
Constructs an env instance with empty state.
|
Env(Map<String,Object> defaults)
Constructor.
|
Env(Map<String,Object> defaults,
Map<String,Object> overrides) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all override key-value pairs.
|
boolean |
containsKey(Object key)
Check if a key has a defined value.
|
boolean |
containsValue(Object value)
Check if a value is present.
|
Set<Map.Entry<String,Object>> |
entrySet()
Get the set of entries.
|
Object |
get(Object key)
Get value for key.
|
Map<String,Object> |
getDefaults() |
AviatorEvaluatorInstance |
getInstance() |
boolean |
isEmpty()
Check if no overrides are defined.
|
Set<String> |
keySet()
Get the set of keys.
|
Object |
put(String key,
Object value)
Set an override value.
|
void |
putAll(Map map)
Add all key-value pairs from another map into the overrides map.
|
Object |
remove(Object key)
Remove a key-value pair.
|
void |
setInstance(AviatorEvaluatorInstance instance) |
int |
size()
Get the number of entries in the map.
|
String |
toString()
Gets the map as a String.
|
Collection<Object> |
values()
Get the values.
|
public Env()
public Env(Map<String,Object> defaults)
defaults - map providing defaults for keys not set directlypublic AviatorEvaluatorInstance getInstance()
public void setInstance(AviatorEvaluatorInstance instance)
public void clear()
public boolean containsKey(Object key)
true if the key is present in
the overrides map with a non-null value, or if the key is not present in the overrides map but
is present in the defaults map.containsKey in interface Map<String,Object>key - true if key defined, false if notpublic boolean containsValue(Object value)
containsValue in interface Map<String,Object>value - true if value present as an override, false if notpublic Object get(Object key)
public boolean isEmpty()
public Set<String> keySet()
public Object put(String key, Object value)
public void putAll(Map map)
public Object remove(Object key)
public int size()
public Collection<Object> values()
Copyright © 2019. All rights reserved.