|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.collections.concurrent.SynchronizedCollection<K>
pivot.collections.concurrent.SynchronizedMap<K,V>
public class SynchronizedMap<K,V>
Synchronized implementation of the Map
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.Map |
---|
Map.MapListenerList<K,V> |
Field Summary |
---|
Fields inherited from class pivot.collections.concurrent.SynchronizedCollection |
---|
collection |
Constructor Summary | |
---|---|
SynchronizedMap(Map<K,V> map)
|
Method Summary | |
---|---|
void |
clear()
Removes all entries in the map. |
boolean |
containsKey(K key)
Tests the existence of a key in the dictionary. |
V |
get(K key)
Retrieves the value for the given key. |
ListenerList<MapListener<K,V>> |
getMapListeners()
Returns the map listener collection. |
boolean |
isEmpty()
Tests the emptiness of the dictionary. |
V |
put(K key,
V value)
Sets the value of the given key, creating a new entry or replacing the existing value, and firing a corresponding event. |
V |
remove(K key)
Removes a key/value pair from the map. |
Methods inherited from class pivot.collections.concurrent.SynchronizedCollection |
---|
getComparator, iterator, setComparator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pivot.collections.Map |
---|
setComparator |
Methods inherited from interface pivot.collections.Collection |
---|
getComparator |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Constructor Detail |
---|
public SynchronizedMap(Map<K,V> map)
Method Detail |
---|
public V get(K key)
Dictionary
get
in interface Dictionary<K,V>
key
- The key whose value is to be returned.
public V put(K key, V value)
Map
put
in interface Dictionary<K,V>
put
in interface Map<K,V>
key
- The key whose value is to be set.value
- The value to be associated with the given key.
MapListener.valueAdded(Map, Object)
,
MapListener.valueUpdated(Map, Object, Object)
public V remove(K key)
Dictionary
remove
in interface Dictionary<K,V>
remove
in interface Map<K,V>
key
- The key whose mapping is to be removed.
MapListener.valueRemoved(Map, Object, Object)
public void clear()
Map
clear
in interface Collection<K>
clear
in interface Map<K,V>
MapListener.mapCleared(Map)
public boolean isEmpty()
Dictionary
isEmpty
in interface Dictionary<K,V>
public boolean containsKey(K key)
Dictionary
containsKey
in interface Dictionary<K,V>
key
- The key whose presence in the dictionary is to be tested.
public ListenerList<MapListener<K,V>> getMapListeners()
Map
getMapListeners
in interface Map<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |