public class IntHashtable
extends java.util.Dictionary
implements java.lang.Cloneable, java.io.Serializable
Use just like java.util.Hashtable, except that the keys must be ints. This is much faster than creating a new Integer for each access.
Hashtable
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
IntHashtable.IntHashtablePersistenceDelegate |
Constructor and Description |
---|
IntHashtable() |
IntHashtable(int initialCapacity) |
IntHashtable(int initialCapacity,
float loadFactor) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object value) |
boolean |
containsKey(int key) |
java.util.Enumeration |
elements() |
java.lang.Object |
get(int key) |
java.lang.Object |
get(java.lang.Object okey) |
boolean |
isEmpty() |
java.util.Enumeration |
keys() |
java.lang.Object |
put(int key,
java.lang.Object value) |
java.lang.Object |
put(java.lang.Object okey,
java.lang.Object value) |
protected void |
rehash() |
java.lang.Object |
remove(int key) |
java.lang.Object |
remove(java.lang.Object okey) |
int |
size() |
java.lang.String |
toString() |
public IntHashtable(int initialCapacity, float loadFactor)
public IntHashtable(int initialCapacity)
public IntHashtable()
public int size()
size
in class java.util.Dictionary
public boolean isEmpty()
isEmpty
in class java.util.Dictionary
public java.util.Enumeration keys()
keys
in class java.util.Dictionary
public java.util.Enumeration elements()
elements
in class java.util.Dictionary
public boolean contains(java.lang.Object value)
public boolean containsKey(int key)
public java.lang.Object get(int key)
public java.lang.Object get(java.lang.Object okey)
get
in class java.util.Dictionary
protected void rehash()
public java.lang.Object put(int key, java.lang.Object value)
public java.lang.Object put(java.lang.Object okey, java.lang.Object value)
put
in class java.util.Dictionary
public java.lang.Object remove(int key)
public java.lang.Object remove(java.lang.Object okey)
remove
in class java.util.Dictionary
public void clear()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object