public class

XSNamedMapImpl

extends Object
implements XSNamedMap
java.lang.Object
   ↳ org.apache.xerces.impl.xs.util.XSNamedMapImpl
Known Direct Subclasses

Class Overview

Containts the map between qnames and XSObject's.

Summary

Fields
public static final XSNamedMap EMPTY_MAP An immutable empty map.
Public Constructors
XSNamedMapImpl(String namespace, SymbolHash map)
Construct an XSNamedMap implmentation for one namespace
XSNamedMapImpl(String[] namespaces, SymbolHash[] maps, int num)
Construct an XSNamedMap implmentation for a list of namespaces
XSNamedMapImpl(XSObject[] array, int length)
Construct an XSNamedMap implmentation one namespace from an array
Public Methods
synchronized int getLength()
The number of XSObjects in the XSObjectList.
synchronized XSObject item(int index)
Returns the indexth item in the map.
XSObject itemByName(String namespace, String localName)
Retrieves an XSObject specified by local name and namespace URI.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.xerces.xs.XSNamedMap

Fields

public static final XSNamedMap EMPTY_MAP

An immutable empty map.

Public Constructors

public XSNamedMapImpl (String namespace, SymbolHash map)

Construct an XSNamedMap implmentation for one namespace

Parameters
namespace the namespace to which the components belong
map the map from local names to components

public XSNamedMapImpl (String[] namespaces, SymbolHash[] maps, int num)

Construct an XSNamedMap implmentation for a list of namespaces

Parameters
namespaces the namespaces to which the components belong
maps the maps from local names to components
num the number of namespaces

public XSNamedMapImpl (XSObject[] array, int length)

Construct an XSNamedMap implmentation one namespace from an array

Parameters
array containing all components
length number of components

Public Methods

public synchronized int getLength ()

The number of XSObjects in the XSObjectList. The range of valid child node indices is 0 to length-1 inclusive.

public synchronized XSObject item (int index)

Returns the indexth item in the map. The index starts at 0. If index is greater than or equal to the number of nodes in the list, this returns null.

Parameters
index The position in the map from which the item is to be retrieved.
Returns
  • The XSObject at the indexth position in the XSNamedMap, or null if that is not a valid index.

public XSObject itemByName (String namespace, String localName)

Retrieves an XSObject specified by local name and namespace URI.

Parameters
namespace The namespace URI of the XSObject to retrieve.
localName The local name of the XSObject to retrieve.
Returns
  • A XSObject (of any type) with the specified local name and namespace URI, or null if they do not identify any XSObject in this map.