|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.HashBase
public abstract class HashBase
The base for other hash classes.
Field Summary | |
---|---|
protected int |
deletedCount
The number of deleted slots. |
protected int |
len
The number of slots in the table. |
protected int |
level
The level. |
protected int |
mask
The bit mask to get the index from the hash code. |
protected int |
size
The number of occupied slots, excluding the zero key (if any). |
protected boolean |
zeroKey
Whether the zero key is used. |
Constructor Summary | |
---|---|
HashBase()
|
Method Summary | |
---|---|
protected void |
checkSizeRemove()
Check the size before removing an entry. |
protected int |
getIndex(int hash)
Calculate the index for this hash code. |
protected abstract void |
rehash(int newLevel)
Increase the size of the underlying table and re-distribute the elements. |
protected void |
reset(int newLevel)
Clear the map and reset the level to the specified value. |
int |
size()
Get the size of the map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int mask
protected int len
protected int size
protected int deletedCount
protected int level
protected boolean zeroKey
Constructor Detail |
---|
public HashBase()
Method Detail |
---|
protected abstract void rehash(int newLevel)
newLevel
- the new levelpublic int size()
protected void checkSizeRemove()
protected void reset(int newLevel)
newLevel
- the new levelprotected int getIndex(int hash)
hash
- the hash code
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |