|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.apache.bsf.debug.util.IntHashtable
Hashtable associates keys with values. Keys and values cannot be null. The size of the Hashtable is the number of key/value pairs it contains. The capacity is the number of key/value pairs the Hashtable can hold. The load factor is a float value which determines how full the Hashtable gets before expanding the capacity. If the load factor of the Hashtable is exceeded, the capacity is doubled.
Enumeration,
Serializable,
Object.equals(java.lang.Object),
Object.hashCode()| Constructor Summary | |
|---|---|
IntHashtable()
Constructs a new Hashtable using the default capacity and load factor. |
|
IntHashtable(int capacity)
Constructs a new IntHashtable using the specified capacity and the default load factor. |
|
IntHashtable(int capacity,
float loadFactor)
Constructs a new IntHashtable using the specified capacity and load factor. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all key/value pairs from this IntHashtable, leaving the size zero and the capacity unchanged. |
java.lang.Object |
clone()
Answers a new IntHashtable with the same key/value pairs, capacity and load factor. |
boolean |
contains(java.lang.Object value)
Answers if this Hashtable contains the specified object as the value of at least one of the key/value pairs. |
boolean |
containsKey(int key)
Answers if this Hashtable contains the specified object as a key of one of the key/value pairs. |
java.util.Enumeration |
elements()
Answers an Enumeration on the values of this Hashtable. |
java.lang.Object |
get(int key)
Answers the value associated with the specified key in this Hashtable. |
boolean |
isEmpty()
Answers if this Hashtable has no key/value pairs, a size of zero. |
java.lang.Object |
put(int key,
java.lang.Object value)
Associate the specified value with the specified key in this Hashtable. |
protected void |
rehash()
Increases the capacity of this Hashtable. |
java.lang.Object |
remove(int key)
Remove the key/value pair with the specified key from this Hashtable. |
int |
size()
Answers the number of key/value pairs in this Hashtable. |
java.lang.String |
toString()
Answers the string representation of this Hashtable. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IntHashtable()
public IntHashtable(int capacity)
capacity - the initial capacity
public IntHashtable(int capacity,
float loadFactor)
capacity - the initial capacityloadFactor - the initial load factor| Method Detail |
public void clear()
isEmpty(),
size()public java.lang.Object clone()
Cloneablepublic boolean contains(java.lang.Object value)
value - the object to look for as a value in this Hashtable
containsKey(int),
Object.equals(java.lang.Object)public boolean containsKey(int key)
key - the object to look for as a key in this Hashtable
contains(java.lang.Object),
Object.equals(java.lang.Object)public java.util.Enumeration elements()
#keys,
size(),
Enumerationpublic java.lang.Object get(int key)
key - the key of the value returned
put(int, java.lang.Object)public boolean isEmpty()
size()
public java.lang.Object put(int key,
java.lang.Object value)
key - the key to addvalue - the value to add
elements(),
get(int),
#keys,
Object.equals(java.lang.Object)protected void rehash()
public java.lang.Object remove(int key)
key - the key to remove
get(int),
put(int, java.lang.Object)public int size()
elements(),
#keyspublic java.lang.String toString()
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||