public interface MapService<K,V>
FastMap.FastMap()
Modifier and Type | Method and Description |
---|---|
void |
atomic(Runnable update)
Executes the specified update in an atomic manner.
|
void |
clear()
Removes all of the entries from this map.
|
boolean |
containsKey(K key)
Indicates if the map contains the specified key.
|
SetService<Map.Entry<K,V>> |
entrySet()
Returns the set view of this map entries.
|
V |
get(K key)
Returns the value associated to the specified key.
|
SetService<K> |
keySet()
Returns the set view of this map keys.
|
V |
put(K key,
V value)
Associates the specified value to the specified key; returns
the previously associated value if any.
|
V |
putIfAbsent(K key,
V value)
Associates the specified key with the specified value unless
it is already associated.
|
V |
remove(K key)
Removes the specified key and returns the previously associated value
if any.
|
boolean |
remove(K key,
V value)
Removes the entry for a key only if currently mapped to the
specified value.
|
V |
replace(K key,
V value)
Replaces the entry for a key only if currently mapped to the
specified value.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Replaces the entry for a key only if currently mapped to the
specified value.
|
int |
size()
Returns the number of entries in this map.
|
CollectionService<V> |
values()
Returns the collection view of this map values.
|
void atomic(Runnable update)
void clear()
boolean containsKey(K key)
SetService<Map.Entry<K,V>> entrySet()
Map.entrySet()
the view supports adding new
entries to the map.SetService<K> keySet()
Map.keySet()
the view supports adding new
keys to the map (associated value is null
).V put(K key, V value)
V putIfAbsent(K key, V value)
V remove(K key)
boolean remove(K key, V value)
V replace(K key, V value)
boolean replace(K key, V oldValue, V newValue)
int size()
CollectionService<V> values()
Copyright © 2005-2013 Javolution. All Rights Reserved.