|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.script.SimpleBindings
public class SimpleBindings
A simple implementation of Bindings, backed by a HashMap (or other Map). This class is not synchronized (nor is HashMap). See Javadoc of Java Scripting API
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
SimpleBindings()
Constructs a SimpleBindings. |
|
SimpleBindings(Map map)
Constructs a SimpleBindings and initializes it using a specified map. |
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(Object value)
|
Set |
entrySet()
|
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
Deprecated. use put(String, Object) instead |
Object |
put(String key,
Object value)
Associates the specified value with the specified key in a java.util.Map. |
void |
putAll(Map toMerge)
Copies all of the mappings from the specified map to this map. |
Object |
remove(Object key)
Removes the mapping for this key from this map if it is present (optional operation). |
int |
size()
|
Collection |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public SimpleBindings()
public SimpleBindings(Map map)
map
- a map which is used to initialize the
SimpleBindings
NullPointerException
- if the map is nullMethod Detail |
---|
public Object put(String key, Object value)
put
in interface Bindings
key
- the String value which uniquely identifies the
objectvalue
- the object to be stored.
NullPointerException
- if the key is null
IllegalArgumentException
- if the key is the empty Stringpublic Object put(Object key, Object value)
put
in interface Map
public void putAll(Map toMerge)
putAll
in interface Map
putAll
in interface Bindings
toMerge
- mappings to be stored in the map.public int size()
size
in interface Map
public void clear()
clear
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
containsKey
in interface Bindings
key
- key whose presence in this map is to be tested.
public boolean containsValue(Object value)
containsValue
in interface Map
public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
public Object get(Object key)
get
in interface Map
get
in interface Bindings
key
- key whose presence in this map is to be tested.
public Set keySet()
keySet
in interface Map
public Object remove(Object key)
remove
in interface Map
remove
in interface Bindings
key
- key of entry to be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |