org.fest.swing.junit.xml
Class XmlAttribute

java.lang.Object
  extended by 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.

Author:
Alex Ruiz

Nested Class Summary
static class XmlAttribute.XmlAttributeBuilder
          Understands creation of XmlAttributes.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether the given Object is equal to this attribute.
 int hashCode()
          Returns the hash code of this attribute, based on its name and value.
 String name()
          Returns the name of this attribute.
static XmlAttribute.XmlAttributeBuilder name(String name)
          Creates a new XmlAttribute.XmlAttributeBuilder.
 String toString()
          Returns a String representation of this attribute.
 String value()
          Returns the value of this attribute.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

name

public static XmlAttribute.XmlAttributeBuilder name(String name)
Creates a new XmlAttribute.XmlAttributeBuilder.

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.


Copyright © 2007-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.