ecologylab.generic
Class HashMapWriteSynch2Args<K,V,A>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
ecologylab.generic.HashMapWriteSynchBase<K,V>
ecologylab.generic.HashMapWriteSynch2Args<K,V,A>
- Type Parameters:
K - V - A - 2nd argument to value constructor
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
public class HashMapWriteSynch2Args<K,V,A>
- extends HashMapWriteSynchBase<K,V>
Hashed data structure with synchronized writes/deletes and unsynchronized reads.
Constructor takes 2 args. First one is the key.
- Author:
- andruid, robinson
- See Also:
- Serialized Form
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
HashMapWriteSynch2Args
public HashMapWriteSynch2Args(int arg0,
float arg1)
- Parameters:
arg0 - arg1 -
HashMapWriteSynch2Args
public HashMapWriteSynch2Args(int arg0)
- Parameters:
arg0 -
HashMapWriteSynch2Args
public HashMapWriteSynch2Args()
HashMapWriteSynch2Args
public HashMapWriteSynch2Args(java.util.Map arg0)
- Parameters:
arg0 -
getOrCreateAndPutIfNew
public V getOrCreateAndPutIfNew(K key,
A arg,
ValueFactory2<K,V,A> factory)
- If there is already an entry, return it.
Otherwise, create an entry with the factory.
- Returns:
- The entry matching key, found or constructed.