org.exist.dom
Class QNamePool

java.lang.Object
  extended by org.exist.util.hashtable.AbstractHashtable
      extended by org.exist.dom.QNamePool

public class QNamePool
extends AbstractHashtable

A pool for QNames. This is a temporary pool for QName objects to avoid allocating the same QName multiple times. If the pool is full, it will just be cleared.

Author:
wolf

Constructor Summary
QNamePool()
           
QNamePool(int iSize)
           
 
Method Summary
 QName add(byte type, String namespaceURI, String localName, String prefix)
          Add a QName, consisting of namespace, local name and prefix, to the pool.
 QName get(byte type, String namespaceURI, String localName, String prefix)
          Return a QName object for the given local name, namespace and prefix.
 Iterator iterator()
           
 Iterator valueIterator()
           
 
Methods inherited from class org.exist.util.hashtable.AbstractHashtable
getMaxRehash, isPrime, nextPrime, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNamePool

public QNamePool()

QNamePool

public QNamePool(int iSize)
Method Detail

get

public QName get(byte type,
                 String namespaceURI,
                 String localName,
                 String prefix)
Return a QName object for the given local name, namespace and prefix. Return null if the QName has not yet been added to the pool.

Parameters:
type -
namespaceURI -
localName -
prefix -
Returns:
QName object

add

public QName add(byte type,
                 String namespaceURI,
                 String localName,
                 String prefix)
Add a QName, consisting of namespace, local name and prefix, to the pool.


iterator

public Iterator iterator()
Specified by:
iterator in class AbstractHashtable

valueIterator

public Iterator valueIterator()
Specified by:
valueIterator in class AbstractHashtable


Copyright (C) Wolfgang Meier. All rights reserved.