public class HashItemSet extends ASet implements ItemSet
TokenSet
class.Constructor and Description |
---|
HashItemSet()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Item key,
InputInfo ii)
Stores the specified key if it has not been stored before.
|
protected int |
hash(int id)
Returns the hash value of the element with the specified id.
|
int |
id(Item key,
InputInfo ii)
Returns the id of the specified key, or
0 if the key does not exist. |
Iterator<Item> |
iterator() |
int |
put(Item key,
InputInfo ii)
Stores the specified key and returns its id.
|
protected void |
rehash(int newSize)
Rehashes all entries.
|
public final boolean add(Item key, InputInfo ii) throws QueryException
ItemSet
add
in interface ItemSet
key
- key to be addedii
- input infotrue
if the key did not exist yet and was storedQueryException
- query exceptionpublic int put(Item key, InputInfo ii) throws QueryException
key
- key to be addedii
- input infoQueryException
- query exceptionpublic final int id(Item key, InputInfo ii) throws QueryException
0
if the key does not exist.key
- key to be looked upii
- input info0
if key does not existQueryException
- query exceptionprotected int hash(int id)
ASet
Copyright © 2005–2015 BaseX Team. All rights reserved.