Package javax.script

Class SimpleBindings

java.lang.Object
javax.script.SimpleBindings
All Implemented Interfaces:
Map<String,​Object>, Bindings

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

    Nested classes/interfaces declared in interface java.util.Map

    Map.Entry<K,​V>
  • Constructor Summary

    Constructors 
    Constructor Description
    SimpleBindings()
    Default constructor uses a HashMap.
    SimpleBindings​(Map<String,​Object> m)
    Constructor uses an existing Map to store the values.
  • Method Summary

    Modifier and Type Method Description
    boolean containsKey​(Object key)
    Returns true 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 underlying map field.
    void putAll​(Map<? extends String,​? extends Object> toMerge)
    putAll is implemented using Map.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