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:
Map
,org.apache.xerces.xs.XSNamedMap
- Direct Known Subclasses:
XSNamedMap4Types
Contains 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXSNamedMapImpl
(String[] namespaces, SymbolHash[] maps, int num) Construct an XSNamedMap implementation for a list of namespacesXSNamedMapImpl
(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
Modifier and TypeMethodDescriptionboolean
containsKey
(Object key) entrySet()
int
The number ofXSObjects
in theXSObjectList
.org.apache.xerces.xs.XSObject
item
(int index) Returns theindex
th item in the collection ornull
ifindex
is greater than or equal to the number of objects in the list.org.apache.xerces.xs.XSObject
itemByName
(String namespace, String localName) Retrieves anXSObject
specified by local name and namespace URI.int
size()
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, values
-
Field Details
-
EMPTY_MAP
An immutable empty map.
-
-
Constructor Details
-
XSNamedMapImpl
Construct an XSNamedMap implementation for one namespace- Parameters:
namespace
- the namespace to which the components belongmap
- the map from local names to components
-
XSNamedMapImpl
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 Details
-
getLength
public int getLength()The number ofXSObjects
in theXSObjectList
. The range of valid child object indices is 0 tolength-1
inclusive.- Specified by:
getLength
in interfaceorg.apache.xerces.xs.XSNamedMap
-
itemByName
Retrieves anXSObject
specified by local name and namespace URI.
Per XML Namespaces, applications must use the valuenull
as thenamespace
parameter for methods if they wish to specify no namespace.- Specified by:
itemByName
in interfaceorg.apache.xerces.xs.XSNamedMap
- Parameters:
namespace
- The namespace URI of theXSObject
to retrieve, ornull
if theXSObject
has no namespace.localName
- The local name of theXSObject
to retrieve.- Returns:
- A
XSObject
(of any type) with the specified local name and namespace URI, ornull
if they do not identify any object in this map.
-
item
public org.apache.xerces.xs.XSObject item(int index) Returns theindex
th item in the collection ornull
ifindex
is greater than or equal to the number of objects in the list. The index starts at 0.- Specified by:
item
in interfaceorg.apache.xerces.xs.XSNamedMap
- Parameters:
index
- index into the collection.- Returns:
- The
XSObject
at theindex
th position in theXSObjectList
, ornull
if the index specified is not valid.
-
containsKey
- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classAbstractMap
-
get
- Specified by:
get
in interfaceMap
- Overrides:
get
in classAbstractMap
-
size
public int size()- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractMap
-
entrySet
- Specified by:
entrySet
in interfaceMap
- Specified by:
entrySet
in classAbstractMap
-