| java.lang.Object org.hsqldb.store.BaseHashMap
All known Subclasses: org.hsqldb.store.ObjectCacheHashMap, org.hsqldb.lib.IntKeyIntValueHashMap, org.hsqldb.lib.HashMap, org.hsqldb.lib.IntValueHashMap, org.hsqldb.lib.IntKeyLongValueHashMap, org.hsqldb.lib.HashSet, org.hsqldb.lib.IntKeyHashMap, org.hsqldb.lib.LongKeyIntValueHashMap, org.hsqldb.store.ValuePoolHashMap,
BaseHashMap | public class BaseHashMap (Code) | | |
Constructor Summary | |
protected | BaseHashMap(int initialCapacity, float loadFactor, int keyType, int valueType, boolean hasAccessCount) |
Method Summary | |
protected Object | addOrRemove(long longKey, long longValue, Object objectKey, Object objectValue, boolean remove) | protected Object | addOrRemove(int intKey, Object objectValue, boolean remove) | public void | clear() Clear the map completely. | protected void | clear(int count, int margin) Clear approximately count elements from the map, starting with
those with low accessTable ranking. | protected boolean | containsKey(Object key) | protected boolean | containsKey(int key) | protected boolean | containsKey(long key) | protected boolean | containsValue(Object value) | protected int | getAccessCountCeiling(int count, int margin) Return the max accessCount value for count elements with the lowest
access count. | protected int | getLookup(Object key, int hash) | protected int | getLookup(int key) | protected int | getLookup(long key) | public boolean | isEmpty() | int | nextLookup(int lookup, int limitLookup, boolean hasZeroKey, int zeroKeyIndex) | protected int | nextLookup(int lookup) | protected void | rehash(int newCapacity) rehash uses existing key and element arrays. | void | removeFromElementArrays(int lookup) | protected Object | removeLookup(int lookup) | protected Object | removeObject(Object objectKey) | protected void | removeRow(int lookup) | protected boolean | reset() | void | resetAccessCount() | public int | size() |
NO_PURGE | final protected static int NO_PURGE(Code) | | |
PURGE_ALL | final protected static int PURGE_ALL(Code) | | |
PURGE_HALF | final protected static int PURGE_HALF(Code) | | |
PURGE_QUARTER | final protected static int PURGE_QUARTER(Code) | | |
accessCount | int accessCount(Code) | | |
accessTable | int[] accessTable(Code) | | |
hasZeroKey | boolean hasZeroKey(Code) | | |
initialCapacity | final int initialCapacity(Code) | | |
intKeyOrValue | final protected static int intKeyOrValue(Code) | | |
intKeyTable | protected int[] intKeyTable(Code) | | |
intValueTable | protected int[] intValueTable(Code) | | |
isIntKey | boolean isIntKey(Code) | | Base class for hash tables or sets. The exact type of the structure is
defined by the constructor. Each instance has at least a keyTable array
and a HashIndex instance for looking up the keys into this table. Instances
that are maps also have a valueTable the same size as the keyTable.
Special getOrAddXXX() methods are used for object maps in some subclasses.
author: fredt@users version: 1.8.0 since: 1.7.2 |
isIntValue | boolean isIntValue(Code) | | |
isLongKey | boolean isLongKey(Code) | | |
isLongValue | boolean isLongValue(Code) | | |
isNoValue | boolean isNoValue(Code) | | |
isObjectKey | boolean isObjectKey(Code) | | |
isObjectValue | boolean isObjectValue(Code) | | |
loadFactor | final float loadFactor(Code) | | |
longKeyOrValue | final protected static int longKeyOrValue(Code) | | |
longKeyTable | protected long[] longKeyTable(Code) | | |
longValueTable | protected long[] longValueTable(Code) | | |
maxCapacity | int maxCapacity(Code) | | |
minimizeOnEmpty | protected boolean minimizeOnEmpty(Code) | | |
noKeyOrValue | final protected static int noKeyOrValue(Code) | | |
objectKeyOrValue | final protected static int objectKeyOrValue(Code) | | |
purgePolicy | protected int purgePolicy(Code) | | |
zeroKeyIndex | int zeroKeyIndex(Code) | | |
BaseHashMap | protected BaseHashMap(int initialCapacity, float loadFactor, int keyType, int valueType, boolean hasAccessCount) throws IllegalArgumentException(Code) | | |
addOrRemove | protected Object addOrRemove(long longKey, long longValue, Object objectKey, Object objectValue, boolean remove)(Code) | | generic method for adding or removing keys
|
addOrRemove | protected Object addOrRemove(int intKey, Object objectValue, boolean remove)(Code) | | type-specific method for adding or removing keys in int->Object maps
|
clear | public void clear()(Code) | | Clear the map completely.
|
clear | protected void clear(int count, int margin)(Code) | | Clear approximately count elements from the map, starting with
those with low accessTable ranking.
Only for maps with Object key table
|
containsKey | protected boolean containsKey(int key)(Code) | | |
containsKey | protected boolean containsKey(long key)(Code) | | |
containsValue | protected boolean containsValue(Object value)(Code) | | |
getAccessCountCeiling | protected int getAccessCountCeiling(int count, int margin)(Code) | | Return the max accessCount value for count elements with the lowest
access count. Always return at least accessMin + 1
|
getLookup | protected int getLookup(Object key, int hash)(Code) | | |
getLookup | protected int getLookup(int key)(Code) | | |
getLookup | protected int getLookup(long key)(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
nextLookup | int nextLookup(int lookup, int limitLookup, boolean hasZeroKey, int zeroKeyIndex)(Code) | | find the next lookup in the key/value tables with an entry
allows the use of old limit and zero int key attributes
|
nextLookup | protected int nextLookup(int lookup)(Code) | | find the next lookup in the key/value tables with an entry
uses current limits and zero integer key state
|
rehash | protected void rehash(int newCapacity)(Code) | | rehash uses existing key and element arrays. key / value pairs are
put back into the arrays from the top, removing any gaps. any redundant
key / value pairs duplicated at the end of the array are then cleared.
newCapacity must be larger or equal to existing number of elements.
|
removeFromElementArrays | void removeFromElementArrays(int lookup)(Code) | | move the elements after a removed key / value pair to fill the gap
|
removeObject | protected Object removeObject(Object objectKey)(Code) | | type specific method for Object sets or Object->Object maps
|
removeRow | protected void removeRow(int lookup)(Code) | | row must already been freed of key / element
|
reset | protected boolean reset()(Code) | | |
resetAccessCount | void resetAccessCount()(Code) | | |
|
|