K - The type of keys in the table.V - The type of values in the table.public final class HashTable<K,V>
extends java.util.AbstractMap<K,V>
implements java.util.Map<K,V>, java.lang.Cloneable
| Constructor and Description |
|---|
HashTable()
This default constructor creates an instance of a hash table with the minimum
capacity (16 elements).
|
HashTable(int minimumCapacity)
This constructor creates an instance of a hash table with at least the specified
minimum capacity.
|
HashTable(java.util.Map<? extends K,? extends V> elements)
This constructor creates an instance of a hash table that contains the elements from
the specified collection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.lang.Object |
clone() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
boolean |
isEmpty() |
V |
put(K key,
V value) |
V |
remove(java.lang.Object key) |
int |
size() |
equals, hashCode, keySet, putAll, toString, valuespublic HashTable()
public HashTable(int minimumCapacity)
minimumCapacity - The minimum initial size of the table.public int size()
public void clear()
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.