| Constructor | 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 | Description |
|---|---|---|
void |
clear() |
Clear all override key-value pairs.
|
void |
configure(AviatorEvaluatorInstance instance,
Expression exp) |
|
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 |
forgot(Object key) |
Remove a key-value pair from overrides.
|
Object |
get(Object key) |
Get value for key.
|
Map<String,Object> |
getDefaults() |
|
Expression |
getExpression() |
|
AviatorEvaluatorInstance |
getInstance() |
|
boolean |
isEmpty() |
Check if no overrides are defined.
|
Set<String> |
keySet() |
Get the set of keys.
|
Object |
override(String key,
Object value) |
Set an override value.
|
Object |
put(String key,
Object value) |
Assign an value, if it's already in overrides, it will update it, otherwise set it to default
map.
|
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 |
setExpression(Expression expression) |
|
void |
setInstance(AviatorEvaluatorInstance instance) |
|
void |
setmOverrides(Map<String,Object> mOverrides) |
|
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 Expression getExpression()
public void setExpression(Expression expression)
public AviatorEvaluatorInstance getInstance()
public void setInstance(AviatorEvaluatorInstance instance)
public void configure(AviatorEvaluatorInstance instance, Expression exp)
public void clear()
public boolean containsKey(Object key)
true if the key is present in
the overrides map or 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 override(String key, Object value)
key - value - public Object put(String key, Object value)
public void putAll(Map map)
public Object remove(Object key)
public Object forgot(Object key)
key - public int size()
public Collection<Object> values()
Copyright © 2022–2023. All rights reserved.