public class AttributeMapWithIdentity extends java.lang.Object implements AttributeMap
However, an AttributeMapWithIdentity
, like any other AttributeMap
,
is an immutable object.
Modifier and Type | Method and Description |
---|---|
AttributeMapWithIdentity |
add(AttributeInfo info) |
java.util.List<AttributeInfo> |
asList()
Get the contents of the AttributeMap as a list of
AttributeInfo objects. |
AttributeInfo |
get(NodeName name)
Get the attribute with a given name, if it exists
|
AttributeInfo |
get(java.lang.String uri,
java.lang.String local)
Get the attribute with a given name, if it exists
|
AttributeInfo |
getByFingerprint(int fingerprint,
NamePool namePool) |
int |
getIndex(java.lang.String uri,
java.lang.String local) |
AttributeInfo |
itemAt(int index)
Get the AttributeInfo with a given index.
|
AxisIterator |
iterateAttributes(ElementImpl owner) |
java.util.Iterator<AttributeInfo> |
iterator() |
AttributeMapWithIdentity |
remove(int index)
Remove an existing attribute, to create a new AttributeMap
|
AttributeMapWithIdentity |
set(int index,
AttributeInfo info) |
int |
size()
Return the number of attributes in the map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int size()
size
in interface AttributeMap
public AxisIterator iterateAttributes(ElementImpl owner)
public AttributeInfo get(NodeName name)
AttributeMap
get
in interface AttributeMap
name
- the name of the required attributepublic AttributeInfo get(java.lang.String uri, java.lang.String local)
AttributeMap
get
in interface AttributeMap
uri
- the namespace part of the name of the required attributelocal
- the local part of the name of the required attributepublic int getIndex(java.lang.String uri, java.lang.String local)
public AttributeMapWithIdentity set(int index, AttributeInfo info)
public AttributeMapWithIdentity add(AttributeInfo info)
public AttributeMapWithIdentity remove(int index)
index
- the index of the attribute to be removed (if it exists)public AttributeInfo getByFingerprint(int fingerprint, NamePool namePool)
getByFingerprint
in interface AttributeMap
public java.util.Iterator<AttributeInfo> iterator()
iterator
in interface java.lang.Iterable<AttributeInfo>
public java.util.List<AttributeInfo> asList()
AttributeMap
AttributeInfo
objects.
The order of the returned list must be consistent with document order, with
the order of the attribute axis, and with position-based retrieval of individual
AttributeInfo
objects; multiple calls are not required to return the
same list, but they must be consistent in their ordering.
Modifying the returned list has no effect on the AttributeMap
asList
in interface AttributeMap
public AttributeInfo itemAt(int index)
AttributeMap
itemAt
in interface AttributeMap
index
- the index position, zero-based. The order of index positions
of attributes in an attribute map reflects document order.asList().get(index)
. However, if the tree has been modified,
then the index values of the attributes may not be contiguous.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.