Methods Summary |
---|
public boolean | equals(java.lang.Object object)Compares the current Attribute Object with another Attribute Object.
if (!(object instanceof Attribute)) {
return false;
}
Attribute val = (Attribute) object;
if (value == null) {
if (val.getValue() == null) {
return name.equals(val.getName());
} else {
return false;
}
}
return ((name.equals(val.getName())) &&
(value.equals(val.getValue())));
|
public java.lang.String | getName()Returns a String containing the name of the attribute.
return name;
|
public java.lang.Object | getValue()Returns an Object that is the value of this attribute.
return value;
|
public int | hashCode()Returns a hash code value for this attribute.
return name.hashCode() ^ (value == null ? 0 : value.hashCode());
|
public java.lang.String | toString()Returns a String object representing this Attribute's value. The format of this
string is not specified, but users can expect that two Attributes return the
same string if and only if they are equal.
return getName() + " = " + getValue();
|