org.hsqldb.store
Class BaseHashMap
java.lang.Object
org.hsqldb.store.BaseHashMap
- Direct Known Subclasses:
- HashMap, HashSet, IntKeyHashMap, IntKeyIntValueHashMap, IntValueHashMap, ValuePoolHashMap
- public class BaseHashMap
- extends Object
Constructor Summary |
protected |
BaseHashMap(int initialCapacity,
float loadFactor,
int keyType,
int valueType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hashIndex
protected org.hsqldb.store.HashIndex hashIndex
intKeyTable
protected int[] intKeyTable
objectKeyTable
protected Object[] objectKeyTable
longKeyTable
protected long[] longKeyTable
intValueTable
protected int[] intValueTable
objectValueTable
protected Object[] objectValueTable
longValueTable
protected long[] longValueTable
purgePolicy
protected int purgePolicy
noKeyOrValue
protected static final int noKeyOrValue
- See Also:
- Constant Field Values
intKeyOrValue
protected static final int intKeyOrValue
- See Also:
- Constant Field Values
longKeyOrValue
protected static final int longKeyOrValue
- See Also:
- Constant Field Values
objectKeyOrValue
protected static final int objectKeyOrValue
- See Also:
- Constant Field Values
NO_PURGE
protected static final int NO_PURGE
- See Also:
- Constant Field Values
PURGE_ALL
protected static final int PURGE_ALL
- See Also:
- Constant Field Values
PURGE_HALF
protected static final int PURGE_HALF
- See Also:
- Constant Field Values
PURGE_QUARTER
protected static final int PURGE_QUARTER
- See Also:
- Constant Field Values
BaseHashMap
protected BaseHashMap(int initialCapacity,
float loadFactor,
int keyType,
int valueType)
throws IllegalArgumentException
getObject
protected Object getObject(int key)
getObject
protected Object getObject(long key)
getObject
protected Object getObject(Object key)
getLookup
protected int getLookup(Object key,
int hash)
getLookup
protected int getLookup(int key)
getLookup
protected int getLookup(long key)
addOrRemove
protected Object addOrRemove(long longKey,
long longValue,
Object objectKey,
Object objectValue,
boolean remove)
removeObject
protected Object removeObject(Object objectKey)
reset
protected boolean reset()
rehash
protected void rehash(int newCapacity)
- 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.
removeRow
protected void removeRow(int lookup)
- row must already been freed of key / element
removeLookup
protected Object removeLookup(int lookup)
clear
public void clear()
- Clear the map completely.
clear
protected void clear(int count)
- Clear approximately count elements from the map, starting with
those with low accessTable ranking.
size
public int size()
isEmpty
public boolean isEmpty()
containsKey
protected boolean containsKey(Object key)
containsKey
protected boolean containsKey(int key)
containsKey
protected boolean containsKey(long key)
containsValue
protected boolean containsValue(Object value)
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.