Package org.wildfly.naming.client.util
Class FastHashtable<K,V>
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,V>
org.wildfly.naming.client.util.FastHashtable<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,V>
A hashtable that is implemented in terms of a fast concurrent map instead of a slow synchronized hash table.
- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFastHashtable(int initialCapacity) FastHashtable(int initialCapacity, float loadFactor) FastHashtable(Map<? extends K, ? extends V> t) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) booleanbooleancontainsKey(Object key) booleancontainsValue(Object value) elements()entrySet()booleanvoidforEach(BiConsumer<? super K, ? super V> action) getOrDefault(Object key, V defaultValue) inthashCode()booleanisEmpty()keys()keySet()longstatic <K,V> FastHashtable<K, V> voidputIfAbsent(K key, V value) protected voidrehash()booleanbooleanvoidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) intsize()toString()values()
-
Constructor Details
-
FastHashtable
public FastHashtable(int initialCapacity, float loadFactor) -
FastHashtable
public FastHashtable(int initialCapacity) -
FastHashtable
public FastHashtable() -
FastHashtable
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
get
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classHashtable<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classHashtable<K,V>
-
put
-
putAll
-
remove
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
hashCode
public int hashCode() -
toString
-
equals
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<K,V> - Overrides:
putIfAbsentin classHashtable<K,V>
-
remove
-
replace
-
replace
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<K,V> - Overrides:
getOrDefaultin classHashtable<K,V>
-
forEach
-
replaceAll
- Specified by:
replaceAllin interfaceMap<K,V> - Overrides:
replaceAllin classHashtable<K,V>
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceMap<K,V> - Overrides:
computeIfAbsentin classHashtable<K,V>
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceMap<K,V> - Overrides:
computeIfPresentin classHashtable<K,V>
-
compute
-
merge
-
contains
-
keys
-
elements
-
clone
-
rehash
protected void rehash() -
mappingCount
public long mappingCount() -
keySet
-
of
-