Class Attribute


  • public class Attribute
    extends java.lang.Object
    Represents an XPath attribute of a specific node. Attributes know their name, the node they wrap, and have access to their value.

    Two attributes are equal if they have the same name and their parent nodes are equal.

    Author:
    daniels
    • Constructor Summary

      Constructors 
      Constructor Description
      Attribute​(Node parent, java.lang.String name, java.lang.reflect.Method m)
      Creates a new attribute belonging to the given node using its accessor.
      Attribute​(Node parent, java.lang.String name, java.lang.String value)
      Creates a new attribute belonging to the given node using its string value.
    • Constructor Detail

      • Attribute

        public Attribute​(Node parent,
                         java.lang.String name,
                         java.lang.reflect.Method m)
        Creates a new attribute belonging to the given node using its accessor.
      • Attribute

        public Attribute​(Node parent,
                         java.lang.String name,
                         java.lang.String value)
        Creates a new attribute belonging to the given node using its string value.
    • Method Detail

      • getName

        public java.lang.String getName()
      • getParent

        public Node getParent()
      • getValue

        public java.lang.Object getValue()
      • getStringValue

        public java.lang.String getStringValue()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object