void
|
clear()
Clears this hashtable so that it contains no keys.
|
Object
|
clone()
Creates a shallow copy of this hashtable.
|
Object
|
compute(Object key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
Attempts to compute a mapping for the specified key and its current
mapped value (or null if there is no current mapping).
|
Object
|
computeIfAbsent(Object key, Function<? super K, ? extends V> mappingFunction)
If the specified key is not already associated with a value (or is mapped
to null ), attempts to compute its value using the given mapping
function and enters it into this map unless null .
|
Object
|
computeIfPresent(Object key, BiFunction<? super K, ? super V, ? extends V> remappingFunction)
If the value for the specified key is present and non-null, attempts to
compute a new mapping given the key and its current mapped value.
|
boolean
|
contains(Object value)
Tests if some key maps into the specified value in this hashtable.
|
boolean
|
containsKey(Object key)
Tests if the specified object is a key in this hashtable.
|
boolean
|
containsValue(Object value)
Returns true if this hashtable maps one or more keys to this value.
|
Enumeration<Object>
|
elements()
Returns an enumeration of the values in this hashtable.
|
Set<Entry<Object, Object>>
|
entrySet()
Returns a Set view of the mappings contained in this map.
|
boolean
|
equals(Object o)
Compares the specified Object with this Map for equality,
as per the definition in the Map interface.
|
void
|
forEach(BiConsumer<? super K, ? super V> action)
Performs the given action for each entry in this map until all entries
have been processed or the action throws an exception.
|
Object
|
get(Object key)
Returns the value to which the specified key is mapped,
or null if this map contains no mapping for the key.
|
Object
|
getOrDefault(Object key, Object defaultValue)
Returns the value to which the specified key is mapped, or
defaultValue if this map contains no mapping for the key.
|
int
|
hashCode()
Returns the hash code value for this Map as per the definition in the
Map interface.
|
boolean
|
isEmpty()
Tests if this hashtable maps no keys to values.
|
Set<Object>
|
keySet()
Returns a Set view of the keys contained in this map.
|
Enumeration<Object>
|
keys()
Returns an enumeration of the keys in this hashtable.
|
Object
|
merge(Object key, Object value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
If the specified key is not already associated with a value or is
associated with null, associates it with the given non-null value.
|
Object
|
put(Object key, Object value)
Maps the specified key to the specified
value in this hashtable.
|
void
|
putAll(Map<? extends K, ? extends V> t)
Copies all of the mappings from the specified map to this hashtable.
|
Object
|
putIfAbsent(Object key, Object value)
If the specified key is not already associated with a value (or is mapped
to null ) associates it with the given value and returns
null , else returns the current value.
|
void
|
rehash()
Increases the capacity of and internally reorganizes this
hashtable, in order to accommodate and access its entries more
efficiently.
|
boolean
|
remove(Object key, Object value)
Removes the entry for the specified key only if it is currently
mapped to the specified value.
|
Object
|
remove(Object key)
Removes the key (and its corresponding value) from this
hashtable.
|
boolean
|
replace(Object key, Object oldValue, Object newValue)
Replaces the entry for the specified key only if currently
mapped to the specified value.
|
Object
|
replace(Object key, Object value)
Replaces the entry for the specified key only if it is
currently mapped to some value.
|
void
|
replaceAll(BiFunction<? super K, ? super V, ? extends V> function)
Replaces each entry's value with the result of invoking the given
function on that entry until all entries have been processed or the
function throws an exception.
|
int
|
size()
Returns the number of keys in this hashtable.
|
String
|
toString()
Returns a string representation of this Hashtable object
in the form of a set of entries, enclosed in braces and separated
by the ASCII characters ", " (comma and space).
|
Collection<Object>
|
values()
Returns a Collection view of the values contained in this map.
|