|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.hash.ASet
org.basex.util.hash.TokenSet
org.basex.util.hash.TokenBoolMap
public final class TokenBoolMap
This is an efficient and memory-saving hash map for storing tokens and booleans.
Field Summary |
---|
Fields inherited from class org.basex.util.hash.TokenSet |
---|
keys |
Fields inherited from class org.basex.util.hash.ASet |
---|
bucket, next, size |
Constructor Summary | |
---|---|
TokenBoolMap()
Constructor. |
Method Summary | |
---|---|
boolean |
get(byte[] key)
Returns the value for the specified key. |
void |
put(byte[] key,
boolean value)
Indexes the specified key and stores the associated value. |
protected void |
rehash(int s)
Rehashes all entries. |
Methods inherited from class org.basex.util.hash.TokenSet |
---|
add, add, clear, contains, delete, hash, id, iterator, key, put, read, toString, write |
Methods inherited from class org.basex.util.hash.ASet |
---|
checkSize, isEmpty, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TokenBoolMap()
Method Detail |
---|
public void put(byte[] key, boolean value)
key
- keyvalue
- valuepublic boolean get(byte[] key)
key
- key to be looked up
-1
if the key was not foundprotected void rehash(int s)
ASet
rehash
in class TokenSet
s
- new hash size
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |