Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(ScriptContext ctx)
Writes all parameters into the given
ScriptContext |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static Context |
create()
Creates a new context
|
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
Value |
getValue(Object key)
Provides the value associated with the given key as
Value |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> m) |
void |
putLimited(String key,
Object value,
int limit)
Sets the given value (its string representation), mit limits this to limit characters.
|
Object |
remove(Object key) |
Context |
set(String key,
Object value)
Associates the given value to the given key, while returning this
to permit fluent method chains
|
Context |
setAll(Map<String,Object> data)
Puts all name-value-pairs stored in the given map.
|
int |
size() |
String |
toString() |
Collection<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
@Nonnull public Value getValue(Object key)
Value
key
- the key for which the value should ne returnedpublic void putLimited(String key, Object value, int limit)
key
- the key to which the value should be associatedvalue
- the value which string representation should be put into the contextlimit
- the maximal number of characters to put into the map. Everything after that will be discardedpublic static Context create()
public Context set(String key, Object value)
key
- the key to which the value will be boundvalue
- the value to be associated with the given keypublic Context setAll(Map<String,Object> data)
data
- the name value pairs to be put into the contextpublic void applyTo(ScriptContext ctx)
ScriptContext
ctx
- the context to be filled with the internally stored name value pairsCopyright © 2018. All rights reserved.