Public Member Functions | |
IntHashMap () | |
IntHashMap (int initialCapacity) | |
IntHashMap (int initialCapacity, float loadFactor) | |
int | size () |
boolean | isEmpty () |
boolean | contains (int value) |
boolean | containsValue (int value) |
boolean | containsKey (int key) |
int | get (int key) |
int | put (int key, int value) |
int | remove (int key) |
void | clear () |
int[] | toArray (int[] arr) |
Protected Member Functions | |
void | rehash () |
Private Attributes | |
transient Entry | table [] |
transient int | count |
int | threshold |
float | loadFactor |
This implemenation is based on original java implementation.
|
Constructs a new, empty hashtable with a default capacity and load factor, which is |
|
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is
|
|
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
|
|
Clears this hashtable so that it contains no keys. |
|
Tests if some key maps into the specified value in this hashtable. This operation is more expensive than the Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).
|
|
Tests if the specified object is a key in this hashtable.
|
|
Returns Note that this method is identical in functionality to contains (which predates the Map interface).
|
|
Returns the value to which the specified key is mapped in this map.
|
|
Tests if this hashtable maps no keys to values.
|
|
Maps the specified
The value can be retrieved by calling the
|
|
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently. This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity and load factor. |
|
Removes the key (and its corresponding value) from this hashtable. This method does nothing if the key is not present in the hashtable.
|
|
Returns the number of keys in this hashtable.
|
|
Copies values to array. Note that array capacity has to be large enough.
|
|
The total number of entries in the hash table. |
|
The load factor for the hashtable. |
|
The hash table data. |
|
The table is rehashed when its size exceeds this threshold. (The value of this field is (int)(capacity * loadFactor).) |