|
Modifier and Type |
Method and Description |
|
add |
abstract void add(Binding<? extends K,? extends V> binding)
Add a binding to be included in the map, replacing any previously added binding with the same key.
void add( Binding<? extends K,? extends V> binding)
-
Add a binding to be included in the map, replacing any previously added binding with the same key.
- Parameters:
binding - The binding to be added.
|
|
addAll |
void addAll(Iterable<Binding<K,V>> it)
A convenience method to add a collection of bindings.
void addAll(Iterable< Binding< K, V>> it)
throws IllegalArgumentException
-
A convenience method to add a collection of bindings.
- Parameters:
it - The iterable collection that provides the bindings.
- Throws:
IllegalArgumentException - if the sequence contains a null element or an entry with a null key or value.
|
|
addEntries |
void addEntries(Iterable<Map.Entry<? extends K,? extends V>> it)
A convenience method to add a collection of bindings.
void addEntries(Iterable<Map.Entry<? extends K,? extends V>> it)
throws IllegalArgumentException
-
A convenience method to add a collection of bindings.
- Parameters:
it - The iterable collection that provides the bindings.
- Throws:
IllegalArgumentException - if the sequence contains a null element or an entry with a null key or value.
|
|
containsKey |
abstract boolean containsKey(K key)
Indicate whether or not a binding is specified for a key.
boolean containsKey( K key)
-
Indicate whether or not a binding is specified for a key.
- Parameters:
key - The key.
- Returns:
- true if and only if a binding is specified for the key.
|
|
get |
Return the value currently bound to a key
-
Return the value currently bound to a key
- Parameters:
key - The key.
- Returns:
- the associated value, or null if none.
|
|
isEmpty |
abstract boolean isEmpty()
Indicate whether the map created in the current state would be empty.
boolean isEmpty()
-
Indicate whether the map created in the current state would be empty.
- Returns:
- true if and only if the map would be empty.
|
|
put |
abstract void put(K key,
V value)
Add a binding to be included in the map, replacing any previously added binding with the same key.
-
Add a binding to be included in the map, replacing any previously added binding with the same key.
- Parameters:
key - The key.value - The value.
|
|
putOptional |
void putOptional(K key,
V value)
Optionally add a binding to be included in the map, replacing any previously added binding with the same key.
void putOptional( K key,
V value)
-
Optionally add a binding to be included in the map, replacing any previously added binding with the same key.
- Parameters:
key - The key.value - The value. If null, this method has no effect.
|
|
reset |
abstract void reset()
Remove all previously supplied bindings.
void reset()
-
Remove all previously supplied bindings.
|
|
size |
abstract int size()
Return the number of bindings that would be contained in the map created in the current state.
int size()
-
Return the number of bindings that would be contained in the map created in the current state.
- Returns:
- the number of elements.
|
|
value |
Return a map containing the previously supplied (and not removed) bindings.
-
Return a map containing the previously supplied (and not removed) bindings.
- Returns:
- the map.
|