public interface Bag
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object key,
java.lang.Object value)
Adds an object to the underlying bag corresponding to a particular key.
|
boolean |
containsKey(java.lang.Object key)
Returns true if the namespace contains a mapping for the specified key.
|
java.lang.Object |
get(java.lang.Object key)
Returns an objects corresponding to the key passed.
|
java.lang.Object get(java.lang.Object key)
key
- the key corresponding to which the objects need to be returned.boolean add(java.lang.Object key, java.lang.Object value)
key
- the key with which the value has to be associated.value
- the value to be associated with the key.boolean containsKey(java.lang.Object key)
key
- The key that you want to search for in the bag.