Class XmlAttribute

java.lang.Object
org.fest.swing.junit.xml.XmlAttribute

public class XmlAttribute extends Object
Understands an attribute of a XmlNode. This class is intended for internal use only. It only provides the necessary functionality needed by the FEST-Swing JUnit extension.
  • Field Details

    • name

      private final String name
    • value

      private final String value
  • Constructor Details

  • Method Details

    • name

      public static XmlAttribute.XmlAttributeBuilder name(String name)
      Parameters:
      name - the name of the attribute that the created builder will build.
      Returns:
      the created XmlAttributeBuilder.
    • name

      public String name()
      Returns the name of this attribute.
      Returns:
      the name of this attribute.
    • value

      public String value()
      Returns the value of this attribute.
      Returns:
      the value of this attribute.
    • equals

      public boolean equals(Object obj)
      Indicates whether the given Object is equal to this attribute. To be equal, the given object should be a XmlAttribute with its name and value equal to the ones in this attribute.
      Overrides:
      equals in class Object
      Parameters:
      obj - the Object to compare to.
      Returns:
      true if the given Object is equal to this attribute, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash code of this attribute, based on its name and value.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code of this attribute.
    • toString

      public String toString()
      Returns a String representation of this attribute.
      Overrides:
      toString in class Object
      Returns:
      a String representation of this attribute.