org.basex.util
Class IntMap

java.lang.Object
  extended by org.basex.util.TokenSet
      extended by org.basex.util.IntMap

public final class IntMap
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

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

Constructor Detail

IntMap

public IntMap()
Method Detail

add

public void add(byte[] key,
                int val)
Indexes the specified keys and values. If the entry exists, the old value is replaced.

Parameters:
key - key
val - value

get

public int get(byte[] key)
Returns the value for the specified key.

Parameters:
key - key to be found
Returns:
value or -1 if nothing was found