org.basex.query.util
Class ItemValueMap
java.lang.Object
org.basex.util.hash.ASet
org.basex.query.util.HashItemSet
org.basex.query.util.ItemValueMap
- All Implemented Interfaces:
- java.lang.Iterable<Item>, ItemSet
public class ItemValueMap
- extends HashItemSet
Map for quickly indexing items.
- Author:
- BaseX Team 2005-12, BSD License, Christian Gruen
Method Summary |
void |
add(Item key,
Value value,
InputInfo ii)
Indexes the specified key and stores the associated value. |
Value |
get(Item key,
InputInfo ii)
Returns the value for the specified key. |
protected void |
rehash(int s)
Rehashes all entries. |
java.lang.Iterable<Value> |
values()
Returns a value iterator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ItemValueMap
public ItemValueMap()
add
public void add(Item key,
Value value,
InputInfo ii)
throws QueryException
- Indexes the specified key and stores the associated value.
If the key already exists, the value is updated.
- Parameters:
key
- keyvalue
- valueii
- input info
- Throws:
QueryException
- query exception
get
public Value get(Item key,
InputInfo ii)
throws QueryException
- Returns the value for the specified key.
- Parameters:
key
- key to be foundii
- input info
- Returns:
- value or
null
if nothing was found
- Throws:
QueryException
- query exception
values
public final java.lang.Iterable<Value> values()
- Returns a value iterator.
- Returns:
- iterator
rehash
protected void rehash(int s)
- Description copied from class:
ASet
- Rehashes all entries.
- Overrides:
rehash
in class HashItemSet
- Parameters:
s
- new hash size