| java.lang.Object org.hsqldb.store.BaseHashMap org.hsqldb.store.ValuePoolHashMap
ValuePoolHashMap | public class ValuePoolHashMap extends BaseHashMap (Code) | | Subclass of BaseHashMap for maintaining a pool of objects. Supports a
range of java.lang.* objects.
author: fredt@users version: 1.8.0 since: 1.7.2 |
Constructor Summary | |
public | ValuePoolHashMap(int initialCapacity, int maxCapacity, int purgePolicy) |
getOrAddDate | protected Date getOrAddDate(long longKey)(Code) | | |
getOrAddDouble | protected Double getOrAddDouble(long longKey)(Code) | | |
getOrAddInteger | protected Integer getOrAddInteger(int intKey)(Code) | | |
getOrAddLong | protected Long getOrAddLong(long longKey)(Code) | | |
getOrAddString | protected String getOrAddString(Object key)(Code) | | This is dissimilar to normal hash map get() methods. The key Object
should have an equals(String) method which should return true if the
key.toString.equals(String) is true. Also the key.hashCode() method
must return the same value as key.toString.hashCode().
The above is always true when the key is a String. But it means it is
possible to submit special keys that fulfill the contract. For example
a wrapper around a byte[] can be submitted as key to retrieve either
a new String, which is the toString() method of the wrapper, or return
an existing String which would be equal to the product of toString().
Parameters: key - String or other Object with compatible equals(String)and hashCode(). String from map or a new String |
resetCapacity | public void resetCapacity(int newCapacity, int newPolicy) throws IllegalArgumentException(Code) | | In rare circumstances resetCapacity may not succeed, in which case
capacity remains unchanged but purge policy is set to newPolicy
|
Methods inherited from org.hsqldb.store.BaseHashMap | protected Object addOrRemove(long longKey, long longValue, Object objectKey, Object objectValue, boolean remove)(Code)(Java Doc) protected Object addOrRemove(int intKey, Object objectValue, boolean remove)(Code)(Java Doc) public void clear()(Code)(Java Doc) protected void clear(int count, int margin)(Code)(Java Doc) protected boolean containsKey(Object key)(Code)(Java Doc) protected boolean containsKey(int key)(Code)(Java Doc) protected boolean containsKey(long key)(Code)(Java Doc) protected boolean containsValue(Object value)(Code)(Java Doc) protected int getAccessCountCeiling(int count, int margin)(Code)(Java Doc) protected int getLookup(Object key, int hash)(Code)(Java Doc) protected int getLookup(int key)(Code)(Java Doc) protected int getLookup(long key)(Code)(Java Doc) public boolean isEmpty()(Code)(Java Doc) int nextLookup(int lookup, int limitLookup, boolean hasZeroKey, int zeroKeyIndex)(Code)(Java Doc) protected int nextLookup(int lookup)(Code)(Java Doc) protected void rehash(int newCapacity)(Code)(Java Doc) void removeFromElementArrays(int lookup)(Code)(Java Doc) protected Object removeLookup(int lookup)(Code)(Java Doc) protected Object removeObject(Object objectKey)(Code)(Java Doc) protected void removeRow(int lookup)(Code)(Java Doc) protected boolean reset()(Code)(Java Doc) void resetAccessCount()(Code)(Java Doc) public int size()(Code)(Java Doc)
|
|
|