Package org.apache.xerces.impl.xs.util
Class XSNamedMapImpl
- java.lang.Object
-
- java.util.AbstractMap
-
- org.apache.xerces.impl.xs.util.XSNamedMapImpl
-
- All Implemented Interfaces:
java.util.Map,org.apache.xerces.xs.XSNamedMap
- Direct Known Subclasses:
XSNamedMap4Types
public class XSNamedMapImpl extends java.util.AbstractMap implements org.apache.xerces.xs.XSNamedMapContains the map between qnames and XSObject's.INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSNamedMapImpl.java 965315 2010-07-18 23:06:35Z mrglavas $
- Author:
- Sandy Gao, IBM, Michael Glavassevich, IBM
-
-
Field Summary
Fields Modifier and Type Field Description static XSNamedMapImplEMPTY_MAPAn immutable empty map.
-
Constructor Summary
Constructors Constructor Description XSNamedMapImpl(java.lang.String[] namespaces, SymbolHash[] maps, int num)Construct an XSNamedMap implementation for a list of namespacesXSNamedMapImpl(java.lang.String namespace, SymbolHash map)Construct an XSNamedMap implementation for one namespaceXSNamedMapImpl(org.apache.xerces.xs.XSObject[] array, int length)Construct an XSNamedMap implementation one namespace from an array
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(java.lang.Object key)java.util.SetentrySet()java.lang.Objectget(java.lang.Object key)intgetLength()The number ofXSObjectsin theXSObjectList.org.apache.xerces.xs.XSObjectitem(int index)Returns theindexth item in the collection ornullifindexis greater than or equal to the number of objects in the list.org.apache.xerces.xs.XSObjectitemByName(java.lang.String namespace, java.lang.String localName)Retrieves anXSObjectspecified by local name and namespace URI.intsize()-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, toString, values
-
-
-
-
Field Detail
-
EMPTY_MAP
public static final XSNamedMapImpl EMPTY_MAP
An immutable empty map.
-
-
Constructor Detail
-
XSNamedMapImpl
public XSNamedMapImpl(java.lang.String namespace, SymbolHash map)Construct an XSNamedMap implementation for one namespace- Parameters:
namespace- the namespace to which the components belongmap- the map from local names to components
-
XSNamedMapImpl
public XSNamedMapImpl(java.lang.String[] namespaces, SymbolHash[] maps, int num)Construct an XSNamedMap implementation for a list of namespaces- Parameters:
namespaces- the namespaces to which the components belongmaps- the maps from local names to componentsnum- the number of namespaces
-
XSNamedMapImpl
public XSNamedMapImpl(org.apache.xerces.xs.XSObject[] array, int length)Construct an XSNamedMap implementation one namespace from an array- Parameters:
array- containing all componentslength- number of components
-
-
Method Detail
-
getLength
public int getLength()
The number ofXSObjectsin theXSObjectList. The range of valid child object indices is 0 tolength-1inclusive.- Specified by:
getLengthin interfaceorg.apache.xerces.xs.XSNamedMap
-
itemByName
public org.apache.xerces.xs.XSObject itemByName(java.lang.String namespace, java.lang.String localName)Retrieves anXSObjectspecified by local name and namespace URI.
Per XML Namespaces, applications must use the valuenullas thenamespaceparameter for methods if they wish to specify no namespace.- Specified by:
itemByNamein interfaceorg.apache.xerces.xs.XSNamedMap- Parameters:
namespace- The namespace URI of theXSObjectto retrieve, ornullif theXSObjecthas no namespace.localName- The local name of theXSObjectto retrieve.- Returns:
- A
XSObject(of any type) with the specified local name and namespace URI, ornullif they do not identify any object in this map.
-
item
public org.apache.xerces.xs.XSObject item(int index)
Returns theindexth item in the collection ornullifindexis greater than or equal to the number of objects in the list. The index starts at 0.- Specified by:
itemin interfaceorg.apache.xerces.xs.XSNamedMap- Parameters:
index- index into the collection.- Returns:
- The
XSObjectat theindexth position in theXSObjectList, ornullif the index specified is not valid.
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map- Overrides:
containsKeyin classjava.util.AbstractMap
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map- Overrides:
getin classjava.util.AbstractMap
-
size
public int size()
- Specified by:
sizein interfacejava.util.Map- Overrides:
sizein classjava.util.AbstractMap
-
entrySet
public java.util.Set entrySet()
- Specified by:
entrySetin interfacejava.util.Map- Specified by:
entrySetin classjava.util.AbstractMap
-
-