- All Superinterfaces:
Map
Objects implementing the
XSNamedMap
interface are used to
represent immutable collections of XML Schema components that can be
accessed by name. Note that XSNamedMap
does not inherit from
XSObjectList
. The XSObject
s in
XSNamedMap
s are not maintained in any particular order.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
The number ofXSObjects
in theXSObjectList
.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.itemByName
(String namespace, String localName) Retrieves anXSObject
specified by local name and namespace URI.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
getLength
int getLength()The number ofXSObjects
in theXSObjectList
. The range of valid child object indices is 0 tolength-1
inclusive. -
item
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.- Parameters:
index
- index into the collection.- Returns:
- The
XSObject
at theindex
th position in theXSObjectList
, ornull
if the index specified is not valid.
-
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.- 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.
-