Class TinyAttributeMap

java.lang.Object
net.sf.saxon.tree.tiny.TinyAttributeMap
All Implemented Interfaces:
Iterable<AttributeInfo>, AttributeMap

public class TinyAttributeMap extends Object implements AttributeMap
An implementation of the AttributeMap interface based directly on the TinyTree data structure.
  • Constructor Details

    • TinyAttributeMap

      public TinyAttributeMap(TinyTree tree, int element)
  • Method Details

    • size

      public int size()
      Return the number of attributes in the list.
      Specified by:
      size in interface AttributeMap
      Returns:
      The number of attributes in the list.
    • get

      public AttributeInfo get(NodeName name)
      Description copied from interface: AttributeMap
      Get the attribute with a given name, if it exists
      Specified by:
      get in interface AttributeMap
      Parameters:
      name - the name of the required attribute
      Returns:
      the required attribute if it exists
    • get

      public AttributeInfo get(String uri, String local)
      Description copied from interface: AttributeMap
      Get the attribute with a given name, if it exists
      Specified by:
      get in interface AttributeMap
      Parameters:
      uri - the namespace part of the name of the required attribute
      local - the local part of the name of the required attribute
      Returns:
      the required attribute if it exists
    • getByFingerprint

      public AttributeInfo getByFingerprint(int fingerprint, NamePool namePool)
      Specified by:
      getByFingerprint in interface AttributeMap
    • iterator

      public Iterator<AttributeInfo> iterator()
      Specified by:
      iterator in interface Iterable<AttributeInfo>
    • itemAt

      public AttributeInfo itemAt(int index)
      Description copied from interface: AttributeMap
      Get the AttributeInfo with a given index.
      Specified by:
      itemAt in interface AttributeMap
      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.