|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.util.TokenSet
public class TokenSet
This is a simple hash set, storing keys in byte arrays.
The TokenMap class extends it to a hash map.
| Constructor Summary | |
|---|---|
TokenSet()
Constructor. |
|
TokenSet(DataInput in)
Constructor. |
|
| Method Summary | |
|---|---|
int |
add(byte[] key)
Indexes the specified key and returns the offset of the added key. |
int |
delete(byte[] key)
Deletes the specified key. |
int |
id(byte[] key)
Returns the id of the specified key or 0 if key was not found. |
byte[] |
key(int i)
Returns the specified key. |
byte[][] |
keys()
Returns the hash keys. |
void |
read(DataInput in)
Reads the token set from the specified input. |
int |
size()
Returns number of entries. |
void |
write(DataOutput out)
Writes the token set to the specified output. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenSet()
public TokenSet(DataInput in)
throws IOException
in - input stream
IOException - I/O exception| Method Detail |
|---|
public void read(DataInput in)
throws IOException
in - input stream
IOException - I/O exception
public void write(DataOutput out)
throws IOException
out - output stream
IOException - I/O exceptionpublic final int add(byte[] key)
key - key
public final int delete(byte[] key)
key - key
public final int id(byte[] key)
key - key to be found
public final byte[] key(int i)
i - key index
public final byte[][] keys()
public final int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||