Class TokenBoolMap

All Implemented Interfaces:
Iterable<byte[]>

public final class TokenBoolMap extends TokenSet
This is an efficient and memory-saving hash map for storing tokens and booleans.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • TokenBoolMap

      public TokenBoolMap()
      Constructor.
  • Method Details

    • put

      public void put(byte[] key, boolean value)
      Indexes the specified key and stores the associated value. If the key already exists, the value is updated.
      Parameters:
      key - key
      value - value
    • get

      public boolean get(byte[] key)
      Returns the value for the specified key.
      Parameters:
      key - key to be looked up
      Returns:
      value, or -1 if the key was not found
    • rehash

      protected void rehash(int newSize)
      Description copied from class: ASet
      Rehashes all entries.
      Overrides:
      rehash in class TokenSet
      Parameters:
      newSize - new hash size
    • toString

      public String toString()
      Overrides:
      toString in class TokenSet