Package org.apache.xerces.xs
Interface XSNamedMap
- 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 XSObjects in
XSNamedMaps are not maintained in any particular order.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionintThe number ofXSObjectsin theXSObjectList.item(int index) Returns theindexth item in the collection ornullifindexis greater than or equal to the number of objects in the list.itemByName(String namespace, String localName) Retrieves anXSObjectspecified 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 ofXSObjectsin theXSObjectList. The range of valid child object indices is 0 tolength-1inclusive. -
item
Returns theindexth item in the collection ornullifindexis 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
XSObjectat theindexth position in theXSObjectList, ornullif the index specified is not valid.
-
itemByName
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.- 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.
-