Class XSNamedMap4Types
- java.lang.Object
-
- java.util.AbstractMap
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.util.XSNamedMapImpl
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.util.XSNamedMap4Types
-
- All Implemented Interfaces:
Map
,XSNamedMap
public final class XSNamedMap4Types extends XSNamedMapImpl
Contains the map between qnames and XSObject's.- Version:
- $Id$
- Author:
- Sandy Gao, IBM
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.util.XSNamedMapImpl
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description XSNamedMap4Types(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLength()
The number ofXSObjects
in theXSObjectList
.XSObject
item(int index)
Returns theindex
th item in the map.XSObject
itemByName(String namespace, String localName)
Retrieves anXSObject
specified by local name and namespace URI.-
Methods inherited from class org.smooks.engine.delivery.sax.ng.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 Detail
-
XSNamedMap4Types
public XSNamedMap4Types(String namespace, SymbolHash map, short type)
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
public XSNamedMap4Types(String[] namespaces, SymbolHash[] maps, int num, short type)
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 Detail
-
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 interfaceXSNamedMap
- Overrides:
getLength
in classXSNamedMapImpl
-
itemByName
public XSObject itemByName(String namespace, String localName)
Retrieves anXSObject
specified by local name and namespace URI.- Specified by:
itemByName
in interfaceXSNamedMap
- 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 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 interfaceXSNamedMap
- 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.
-
-