Package org.verifyica.api
Class ExtendedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
org.verifyica.api.ExtendedMap<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
Serializable,ConcurrentMap<K,,V> Map<K,V>
Class to implement ExtendedMap
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K,V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionConstructorExtendedMap(int initialCapacity) ConstructorExtendedMap(int initialCapacity, float loadFactor) ConstructorExtendedMap(int initialCapacity, float loadFactor, int concurrencyLevel) ConstructorExtendedMap(Map<? extends K, ? extends V> m) Constructor -
Method Summary
Modifier and TypeMethodDescription<T> TReturns the value to which the specified key is mapped cast to the assigned type, or null if this map contains no mapping for the key.<T> TReturns the value to which the specified key is mapped cast to the requested type, or null if this map contains no mapping for the key.<T> TRemoves the mapping for a key from this map if it is present, casting to the assigned type.<T> TRemoves the mapping for a key from this map if it is present, casting to the requested type.Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, valuesMethods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
ExtendedMap
public ExtendedMap()Constructor -
ExtendedMap
public ExtendedMap(int initialCapacity) Constructor- Parameters:
initialCapacity- initialCapacity
-
ExtendedMap
Constructor- Parameters:
m- m
-
ExtendedMap
public ExtendedMap(int initialCapacity, float loadFactor) Constructor- Parameters:
initialCapacity- initialCapacityloadFactor- loadFactor
-
ExtendedMap
public ExtendedMap(int initialCapacity, float loadFactor, int concurrencyLevel) Constructor- Parameters:
initialCapacity- initialCapacityloadFactor- loadFactorconcurrencyLevel- concurrencyLevel
-
-
Method Details
-
getAs
Returns the value to which the specified key is mapped cast to the assigned type, or null if this map contains no mapping for the key.- Type Parameters:
T- the assigned type- Parameters:
key- key- Returns:
- the value to which the specified key is mapped cast to the assigned type, or null if this map contains no mapping for the key
-
getAs
Returns the value to which the specified key is mapped cast to the requested type, or null if this map contains no mapping for the key.- Type Parameters:
T- the requested type- Parameters:
key- keytype- type- Returns:
- the value to which the specified key is mapped cast to the requested type, or null if this map contains no mapping for the key
-
removeAs
Removes the mapping for a key from this map if it is present, casting to the assigned type.- Type Parameters:
T- the assigned type- Parameters:
key- key- Returns:
- the previous value associated with key cast to the assigned type, or null if there was no mapping for key
-
removeAs
Removes the mapping for a key from this map if it is present, casting to the requested type.- Type Parameters:
T- the assigned type- Parameters:
key- keytype- type- Returns:
- the previous value associated with key cast to the requested type, or null if there was no mapping for key
-