Package com.kheops.util
Class IntHashtable
java.lang.Object
java.util.Dictionary
com.kheops.util.IntHashtable
- All Implemented Interfaces:
Serializable
,Cloneable
A Hashtable that uses ints as the keys.
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.
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionIntHashtable
(int initialCapacity) IntHashtable
(int initialCapacity, float loadFactor) -
Method Summary
-
Constructor Details
-
IntHashtable
public IntHashtable(int initialCapacity, float loadFactor) -
IntHashtable
public IntHashtable(int initialCapacity) -
IntHashtable
public IntHashtable()
-
-
Method Details
-
size
public int size()- Specified by:
size
in classDictionary
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classDictionary
-
keys
- Specified by:
keys
in classDictionary
-
elements
- Specified by:
elements
in classDictionary
-
contains
-
containsKey
public boolean containsKey(int key) -
get
-
get
- Specified by:
get
in classDictionary
-
rehash
protected void rehash() -
put
-
put
- Specified by:
put
in classDictionary
-
remove
-
remove
- Specified by:
remove
in classDictionary
-
clear
public void clear() -
clone
-
toString
-