org.basex.util
Class Map<E>

java.lang.Object
  extended by org.basex.util.Set
      extended by org.basex.util.Map<E>
Type Parameters:
E - generic value type

public class Map<E>
extends Set

This is a simple hash map, extending the even simpler hash set.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.util.Set
size
 
Constructor Summary
Map()
           
 
Method Summary
 int add(byte[] key, E val)
          Indexes the specified keys and values.
 E get(byte[] key)
          Returns the value for the specified key.
 E value(int p)
          Returns the specified value.
 
Methods inherited from class org.basex.util.Set
add, delete, id, key, keys, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map

public Map()
Method Detail

add

public int add(byte[] key,
               E val)
Indexes the specified keys and values.

Parameters:
key - key
val - value
Returns:
index

get

public 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 E value(int p)
Returns the specified value.

Parameters:
p - value index
Returns:
value