Package org.apache.xerces.impl.xs.util
Class XSNamedMap4Types
java.lang.Object
java.util.AbstractMap
org.apache.xerces.impl.xs.util.XSNamedMapImpl
org.apache.xerces.impl.xs.util.XSNamedMap4Types
- All Implemented Interfaces:
Map
,org.apache.xerces.xs.XSNamedMap
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: XSNamedMap4Types.java 726359 2008-12-14 05:04:10Z mrglavas $
- Author:
- Sandy Gao, IBM
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields inherited from class org.apache.xerces.impl.xs.util.XSNamedMapImpl
EMPTY_MAP
-
Constructor Summary
ConstructorsConstructorDescriptionXSNamedMap4Types
(String[] namespaces, SymbolHash[] maps, int num, short type) Construct an XSNamedMap implementation for a list of namespacesXSNamedMap4Types
(String namespace, SymbolHash map, short type) Construct an XSNamedMap implementation for one namespace -
Method Summary
Modifier and TypeMethodDescriptionint
The number ofXSObjects
in theXSObjectList
.org.apache.xerces.xs.XSObject
item
(int index) Returns theindex
th item in the map.org.apache.xerces.xs.XSObject
itemByName
(String namespace, String localName) Retrieves anXSObject
specified by local name and namespace URI.Methods inherited from class org.apache.xerces.impl.xs.util.XSNamedMapImpl
containsKey, entrySet, get, 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
-
Constructor Details
-
XSNamedMap4Types
Construct an XSNamedMap implementation for one namespace- Parameters:
namespace
- the namespace to which the components belongmap
- the map from local names to componentstype
- the type of components
-
XSNamedMap4Types
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 namespacestype
- the type of components
-
-
Method Details
-
getLength
public int getLength()The number ofXSObjects
in theXSObjectList
. The range of valid child node indices is 0 tolength-1
inclusive.- Specified by:
getLength
in interfaceorg.apache.xerces.xs.XSNamedMap
- Overrides:
getLength
in classXSNamedMapImpl
-
itemByName
Retrieves anXSObject
specified by local name and namespace URI.- Specified by:
itemByName
in interfaceorg.apache.xerces.xs.XSNamedMap
- Overrides:
itemByName
in classXSNamedMapImpl
- Parameters:
namespace
- The namespace URI of theXSObject
to retrieve.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 anyXSObject
in this map.
-
item
public org.apache.xerces.xs.XSObject item(int index) Returns theindex
th item in the map. The index starts at 0. Ifindex
is greater than or equal to the number of nodes in the list, this returnsnull
.- Specified by:
item
in interfaceorg.apache.xerces.xs.XSNamedMap
- Overrides:
item
in classXSNamedMapImpl
- Parameters:
index
- The position in the map from which the item is to be retrieved.- Returns:
- The
XSObject
at theindex
th position in theXSNamedMap
, ornull
if that is not a valid index.
-