Interface XSNamedMap
-
- All Superinterfaces:
Map
- All Known Implementing Classes:
XSNamedMap4Types
,XSNamedMapImpl
public interface XSNamedMap extends Map
Objects implementing theXSNamedMap
interface are used to represent immutable collections of XML Schema components that can be accessed by name. Note thatXSNamedMap
does not inherit fromXSObjectList
. TheXSObject
s inXSNamedMap
s are not maintained in any particular order.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getLength()
The number ofXSObjects
in theXSObjectList
.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.XSObject
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 Detail
-
getLength
int getLength()
The number ofXSObjects
in theXSObjectList
. The range of valid child object indices is 0 tolength-1
inclusive.
-
item
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.- Parameters:
index
- index into the collection.- Returns:
- The
XSObject
at theindex
th position in theXSObjectList
, ornull
if the index specified is not valid.
-
itemByName
XSObject itemByName(String namespace, String localName)
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.
-
-