|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.util.WeakHashtable
A WeakHashtable is used to store data that may be garbage collected. The keys for the data are stored in the hashtable normally, but the data is stored via a weak reference.
| Field Summary | |
protected Hashtable |
table
|
| Constructor Summary | |
WeakHashtable()
|
|
WeakHashtable(int initialCapacity)
|
|
WeakHashtable(int initialCapacity,
float loadFactor)
|
|
| Method Summary | |
void |
clean()
Remove all entries that have been garbage collected already. |
void |
clear()
Remove all data in the table. |
Object |
get(Object key)
Return the object associated with the key. |
Enumeration |
keys()
Return an Enumeration on all the keys in the WeakHashtable. |
void |
put(Object key,
Object data)
Put data into the table with the specified key. |
void |
remove(Object key)
Remove the entry with the specified key. |
int |
size()
Return the number of keys in the WeakHashtable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
protected Hashtable table
| Constructor Detail |
public WeakHashtable(int initialCapacity,
float loadFactor)
public WeakHashtable(int initialCapacity)
public WeakHashtable()
| Method Detail |
public void put(Object key,
Object data)
key - the key to associate with the data.data - the data that will be stored weakly in the table.public Object get(Object key)
key - the key to search on.
public void remove(Object key)
public void clear()
public void clean()
public int size()
public Enumeration keys()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||