org.basex.query.util
Class QNmCache

java.lang.Object
  extended by org.basex.util.hash.ASet
      extended by org.basex.util.hash.TokenSet
          extended by org.basex.query.util.QNmCache
All Implemented Interfaces:
java.lang.Iterable<byte[]>

public final class QNmCache
extends TokenSet

This class caches frequently used QNames.

Author:
BaseX Team 2005-13, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.util.hash.TokenSet
keys
 
Fields inherited from class org.basex.util.hash.ASet
bucket, next, size
 
Constructor Summary
QNmCache()
           
 
Method Summary
 QNm index(byte[] prefix, byte[] local, byte[] uri)
          Creates a QName for the specified key, or returns an existing one.
protected  void rehash(int s)
          Rehashes all entries.
 
Methods inherited from class org.basex.util.hash.TokenSet
add, add, clear, contains, delete, hash, id, iterator, key, put, read, toString, write
 
Methods inherited from class org.basex.util.hash.ASet
checkSize, isEmpty, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QNmCache

public QNmCache()
Method Detail

index

public QNm index(byte[] prefix,
                 byte[] local,
                 byte[] uri)
Creates a QName for the specified key, or returns an existing one.

Parameters:
prefix - prefix (may be null)
local - local name
uri - namespace uri (may be null)
Returns:
name

rehash

protected void rehash(int s)
Description copied from class: ASet
Rehashes all entries.

Overrides:
rehash in class TokenSet
Parameters:
s - new hash size