All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class hplb.xml.SAXAttributeMap

java.lang.Object
   |
   +----hplb.xml.SAXAttributeMap

public class SAXAttributeMap
extends Object
implements AttributeMap
An ordered Dictionary. keys() and elements() returns Enumerations which enumerate over elements in the order they were inserted. Elements are stored linearly. Operations put(), get(), and remove() are linear in the number of elements in the Dictionary.

Allows direct access to elements (as an alternative to using Enumerators) for speed.

Can function as a bag, i.e. it can be created with a mode which allows the same key to map to multiple entries. In this case operations get() and remove() operate on the first pair in the map. Hence to get hold of all values associated with a key it is necessary to use the direct access to underlying arrays.

Author:
Anders Kristensen

Variable Index

 o elms
List of values associated with keys.
 o keys
The list of keys.
 o n
Number of elements in the Dictionary.

Constructor Index

 o SAXAttributeMap()
 o SAXAttributeMap(int)
Create a SAXAttributeMap with the specififed initial cpacity.

Method Index

 o clear()
 o getAttributeNames()
Returns an enumeration of the keys in this dictionary.
 o getEntityPublicID(String)
 o getEntitySystemID(String)
 o getIndex(String)
 o getNotationName(String)
 o getNotationPublicID(String)
 o getNotationSystemID(String)
 o getValue(String)
Returns the value to which the key is mapped in this dictionary.
 o isEmpty()
Returns true if this dictionary maps no keys to value.
 o isEntity(String)
 o isId(String)
 o isIdref(String)
 o isNotation(String)
 o put(String, String)
Maps the specified key to the specified value in this dictionary.
 o size()
Returns the number of keys in this dictionary.
 o toString()

Variables

 o keys
 public String keys[]
The list of keys.

 o elms
 public String elms[]
List of values associated with keys.

 o n
 public int n
Number of elements in the Dictionary. The elements are held at indices 0 to n in the keys and elms arrays.

Constructors

 o SAXAttributeMap
 public SAXAttributeMap()
 o SAXAttributeMap
 public SAXAttributeMap(int size)
Create a SAXAttributeMap with the specififed initial cpacity.

Methods

 o size
 public synchronized int size()
Returns the number of keys in this dictionary.

 o isEmpty
 public synchronized boolean isEmpty()
Returns true if this dictionary maps no keys to value.

 o getAttributeNames
 public Enumeration getAttributeNames()
Returns an enumeration of the keys in this dictionary.

 o getValue
 public synchronized String getValue(String key)
Returns the value to which the key is mapped in this dictionary.

 o getIndex
 protected int getIndex(String key)
 o put
 public synchronized String put(String key,
                                String value)
Maps the specified key to the specified value in this dictionary. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Returns:
the previous value to which the key was mapped in this dictionary, or null if the key did not have a previous mapping.
 o clear
 public void clear()
 o isEntity
 public boolean isEntity(String aname)
 o isNotation
 public boolean isNotation(String aname)
 o isId
 public boolean isId(String aname)
 o isIdref
 public boolean isIdref(String aname)
 o getEntityPublicID
 public String getEntityPublicID(String aname)
 o getEntitySystemID
 public String getEntitySystemID(String aname)
 o getNotationName
 public String getNotationName(String aname)
 o getNotationPublicID
 public String getNotationPublicID(String aname)
 o getNotationSystemID
 public String getNotationSystemID(String aname)
 o toString
 public synchronized String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index