Package net.sf.saxon.om
Class EmptyAttributeMap
java.lang.Object
net.sf.saxon.om.EmptyAttributeMap
- All Implemented Interfaces:
Iterable<AttributeInfo>,AttributeMap
An implementation of AttributeMap representing an empty AttributeMap
-
Method Summary
Modifier and TypeMethodDescriptionapply(Function<AttributeInfo, AttributeInfo> mapper) Get the attribute with a given name, if it existsGet the attribute with a given name, if it existsgetByFingerprint(int fingerprint, NamePool namePool) static EmptyAttributeMapiterator()put(AttributeInfo att) Replace or add an attribute, to create a new AttributeMapRemove an existing attribute, to create a new AttributeMapintsize()Return the number of attributes in the map.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
asList, getValue, itemAt, verifyMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getInstance
-
size
public int size()Return the number of attributes in the map.- Specified by:
sizein interfaceAttributeMap- Returns:
- The number of attributes in the map.
-
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
-
put
Description copied from interface:AttributeMapReplace or add an attribute, to create a new AttributeMap- Specified by:
putin interfaceAttributeMap- Parameters:
att- the attribute to be added or replaced- Returns:
- the new AttributeMap
-
remove
Description copied from interface:AttributeMapRemove an existing attribute, to create a new AttributeMap- Specified by:
removein interfaceAttributeMap- Parameters:
name- the name of the attribute to be removed (if it exists)- Returns:
- a new attribute map in which the specified attribute is omitted. If the attribute map contains no attribute with the given name, the input attribute map (or one equivalent to it) is returned unchanged
-
iterator
- Specified by:
iteratorin interfaceIterable<AttributeInfo>
-
apply
- Specified by:
applyin interfaceAttributeMap
-