Java java.util Hashtable fields, constructors, methods, implement or subclass

Example usage for Java java.util Hashtable fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util Hashtable.

The text is from its open source code.

Subclass

java.util.Hashtable has subclasses.
Click this link to see all its subclasses.

Field

SetkeySet
Each of these fields are initialized to contain an instance of the appropriate view the first time this view is requested.
SetentrySet
Collectionvalues

Constructor

Hashtable()
Constructs a new, empty hashtable with a default initial capacity (11) and load factor (0.75).
Hashtable(int initialCapacity, float loadFactor)
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
Hashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity and default load factor (0.75).
Hashtable(Map t)
Constructs a new hashtable with the same mappings as the given Map.
Hashtable(Void dummy)
A constructor chained from Properties keeps Hashtable fields uninitialized since they are not used.

Method

voidclear()
Clears this hashtable so that it contains no keys.
Objectclone()
Creates a shallow copy of this hashtable.
booleancontains(Object value)
Tests if some key maps into the specified value in this hashtable.
booleancontainsKey(Object key)
Tests if the specified object is a key in this hashtable.
booleancontainsValue(Object value)
Returns true if this hashtable maps one or more keys to this value.
Enumerationelements()
Returns an enumeration of the values in this hashtable.
voidforEach(BiConsumer action)
Vget(Object key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
ClassgetClass()
Returns the runtime class of this Object .
inthashCode()
Returns the hash code value for this Map as per the definition in the Map interface.
booleanisEmpty()
Tests if this hashtable maps no keys to values.
Vput(K key, V value)
Maps the specified key to the specified value in this hashtable.
voidputAll(Map t)
Copies all of the mappings from the specified map to this hashtable.
Vremove(Object key)
Removes the key (and its corresponding value) from this hashtable.
intsize()
Returns the number of keys in this hashtable.
StringtoString()
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).