java.lang.Object
javax.script.SimpleBindings
public class SimpleBindings extends Object implements Bindings
A simple implementation of Bindings backed by
a
HashMap
or some other specified Map
.- Since:
- 1.6
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description SimpleBindings()
Default constructor uses aHashMap
.SimpleBindings(Map<String,Object> m)
Constructor uses an existingMap
to store the values. -
Method Summary
Modifier and Type Method Description boolean
containsKey(Object key)
Returnstrue
if this map contains a mapping for the specified key.Object
get(Object key)
Returns the value to which this map maps the specified key.Object
put(String name, Object value)
Sets the specified key/value in the underlyingmap
field.void
putAll(Map<? extends String,? extends Object> toMerge)
putAll
is implemented usingMap.putAll
.Object
remove(Object key)
Removes the mapping for this key from this map if it is present (optional operation).Methods declared in class java.lang.Object