Class QNmMap<E>

Type Parameters:
E - generic value type
All Implemented Interfaces:
Iterable<QNm>

public final class QNmMap<E> extends QNmSet
This is an efficient and memory-saving hash map for storing QNames and objects. hash set.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • QNmMap

      public QNmMap()
      Default constructor.
  • Method Details

    • put

      public void put(QNm qnm, E val)
      Indexes the specified key and value. If the key exists, the value is updated.
      Parameters:
      qnm - QName to look up
      val - value
    • get

      public E get(QNm qnm)
      Returns the value for the specified key.
      Parameters:
      qnm - QName to look up
      Returns:
      value, or null if nothing was found
    • values

      public Iterable<E> values()
      Returns a value iterator.
      Returns:
      iterator
    • rehash

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

      public String toString()
      Overrides:
      toString in class QNmSet