|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
com.imagero.util.LSPHashtable
LSPHashtable.java LS = LimitedSize P = Priority Objects with low priority removed first if table is full
| Nested Class Summary | |
protected class |
LSPHashtable.PObject
|
| Constructor Summary | |
LSPHashtable(int maxCapacity,
int maxPriority)
Constructs a new, empty hashtable with a default initial capacity (11) |
|
| Method Summary | |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this hashtable. |
protected void |
finalizeObject(LSPHashtable.PObject o)
|
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped in this hashtable. |
int |
getMaxPriority()
max allowed priority for this LSPHastable |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this hashtable.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
int p)
Maps the specified key to the specified value in this hashtable.
|
void |
putAll(java.util.Map t,
int p)
Copies all of the mappings from the specified Map to this Hashtable |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
void |
removeAll(int p)
remove all Objects with priority < p |
protected LSPHashtable.PObject |
removeP(java.lang.Object key)
|
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LSPHashtable(int maxCapacity,
int maxPriority)
maxCapacity - max number of mappings in this LSPHashtablemaxPriority - max number of used priorities for this LSPHashtable
maxPriority=3 means that this LSPHashtable use priorities from 0 till 2| Method Detail |
public java.util.Enumeration elements()
java.util.Hashtable
Enumeration,
Hashtable.keys(),
Hashtable.values(),
Mapprotected void finalizeObject(LSPHashtable.PObject o)
public java.lang.Object get(java.lang.Object key)
java.util.Hashtable
key - a key in the hashtable.
null if the key is not mapped to any value in
this hashtable.Hashtable.put(Object, Object)public int getMaxPriority()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
key to the specified value in this hashtable.
Neither the key nor the value can be null. priority of this mapping is 0
key - the hashtable key.value - the value.
null if it did not have one.Object.equals(Object),
Hashtable.get(Object)
public java.lang.Object put(java.lang.Object key,
java.lang.Object value,
int p)
key to the specified value in this hashtable.
Neither the key nor the value can be null.
p - priority of this mapping
public void putAll(java.util.Map t,
int p)
p - prioritypublic java.lang.Object remove(java.lang.Object key)
java.util.Hashtable
key - the key that needs to be removed.
null if the key did not have a mapping.public void removeAll(int p)
protected LSPHashtable.PObject removeP(java.lang.Object key)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||