|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ThreadLocal<java.util.Map<K,V>>
org.opengts.util.ThreadLocalMap<K,V>
public class ThreadLocalMap<K,V>
A thread local map container
ThreadLocal,
Map| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
ThreadLocalMap()
Constructor |
|
ThreadLocalMap(java.lang.Class<java.util.Map<K,V>> mapClass)
Constructor |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all of the mappings from this map |
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a mapping for the specified key |
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns a Set view of the mappings contained in this map |
boolean |
equals(java.lang.Object o)
Compares a specified object with this map for equality. |
V |
get(java.lang.Object key)
Gets a value to which a specified value is mapped |
protected java.util.Map<K,V> |
getMap()
Gets the supporting map |
java.lang.Class<java.util.Map<K,V>> |
getMapClass()
Gets the class of the supporting Map |
int |
hashCode()
Returns the hash code value for this map |
boolean |
isEmpty()
Returns true if the map is empty |
java.util.Set<K> |
keySet()
Returns a Set view of the keys contained in this map |
V |
put(K key,
V value)
Associates a specied value with a specified key |
void |
putAll(java.util.Map<? extends K,? extends V> t)
Copies all of the mappings from the specified map to this map |
V |
remove(java.lang.Object key)
Removes the mapping for a key from this map if it is present |
int |
size()
Returns the number of key-value mappings in this map |
java.util.Collection<V> |
values()
Returns a Collection view of the values contained in this map |
| Methods inherited from class java.lang.ThreadLocal |
|---|
get, initialValue, remove, set |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadLocalMap()
public ThreadLocalMap(java.lang.Class<java.util.Map<K,V>> mapClass)
mapClass - The class to use for the supporting Map| Method Detail |
|---|
public java.lang.Class<java.util.Map<K,V>> getMapClass()
protected java.util.Map<K,V> getMap()
public void clear()
clear in interface java.util.Map<K,V>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>key - key whose presence in this map is to be tested
public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<K,V>value - value whose presence in this map is to be tested
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet in interface java.util.Map<K,V>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<K,V>equals in class java.lang.Objecto - object to be compared for equality with this map
public V get(java.lang.Object key)
get in interface java.util.Map<K,V>key - The key whose associated value is to be returned
public int hashCode()
hashCode in interface java.util.Map<K,V>hashCode in class java.lang.Objectpublic boolean isEmpty()
isEmpty in interface java.util.Map<K,V>public java.util.Set<K> keySet()
keySet in interface java.util.Map<K,V>
public V put(K key,
V value)
put in interface java.util.Map<K,V>key - key with which the specified value is to be associatedvalue - value to be associated with the specified key
key, or nullpublic void putAll(java.util.Map<? extends K,? extends V> t)
putAll in interface java.util.Map<K,V>t - map whose mappings will be stored in this mappublic V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>key - The key whose value will be removed
key, or nullpublic int size()
size in interface java.util.Map<K,V>public java.util.Collection<V> values()
values in interface java.util.Map<K,V>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||