Package net.sf.saxon.tree.tiny
Class TinyAttributeMap
java.lang.Object
net.sf.saxon.tree.tiny.TinyAttributeMap
- All Implemented Interfaces:
Iterable<AttributeInfo>,AttributeMap
An implementation of the AttributeMap interface based directly on the
TinyTree data structure.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the attribute with a given name, if it existsGet the attribute with a given name, if it existsgetByFingerprint(int fingerprint, NamePool namePool) itemAt(int index) Get the AttributeInfo with a given index.iterator()intsize()Return the number of attributes in the list.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.AttributeMap
apply, asList, getValue, put, remove, verifyMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TinyAttributeMap
-
-
Method Details
-
size
public int size()Return the number of attributes in the list.- Specified by:
sizein interfaceAttributeMap- Returns:
- The number of attributes in the list.
-
get
Description copied from interface:AttributeMapGet the attribute with a given name, if it exists- Specified by:
getin interfaceAttributeMap- Parameters:
name- the name of the required attribute- Returns:
- the required attribute if it exists
-
get
Description copied from interface:AttributeMapGet the attribute with a given name, if it exists- Specified by:
getin interfaceAttributeMap- Parameters:
uri- the namespace part of the name of the required attributelocal- the local part of the name of the required attribute- Returns:
- the required attribute if it exists
-
getByFingerprint
- Specified by:
getByFingerprintin interfaceAttributeMap
-
iterator
- Specified by:
iteratorin interfaceIterable<AttributeInfo>
-
itemAt
Description copied from interface:AttributeMapGet the AttributeInfo with a given index.- Specified by:
itemAtin interfaceAttributeMap- Parameters:
index- the index position, zero-based. The order of index positions of attributes in an attribute map reflects document order.- Returns:
- the AttributeInfo at the given position. In an immutable tree the result will always
be equivalent to calling
asList().get(index). However, if the tree has been modified, then the index values of the attributes may not be contiguous.
-