org.basex.util
Class ObjectMap<E>
java.lang.Object
org.basex.util.TokenSet
org.basex.util.ObjectMap<E>
- Type Parameters:
E
- generic value type
- Direct Known Subclasses:
- StemDir
public class ObjectMap<E>
- extends TokenSet
This is a simple hash map, extending the even simpler
hash set
.
- Author:
- Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen
Method Summary |
E |
get(byte[] key)
Returns the value for the specified key. |
void |
put(byte[] key,
E val)
Indexes the specified keys and values. |
E |
value(int p)
Returns the specified value. |
ObjectMap
public ObjectMap()
put
public final void put(byte[] key,
E val)
- Indexes the specified keys and values.
If the key exists, the value is updated.
- Parameters:
key
- keyval
- value
get
public final E get(byte[] key)
- Returns the value for the specified key.
- Parameters:
key
- key to be found
- Returns:
- value or null if nothing was found
value
public final E value(int p)
- Returns the specified value.
- Parameters:
p
- value index
- Returns:
- value