Cleanup Attribute Javadocs.

This commit is contained in:
sk89q 2013-02-06 17:17:28 -08:00
parent a841aa7215
commit 7acfb3586c

View File

@ -93,9 +93,11 @@ public Attribute(String name) {
} }
/** /**
* Get the name of this attribute. Attribute names allow for distinguishing * Get the name of this attribute.
* different attributes (such as between a PvP flag and an image storage * <p>
* attribute). A region cannot have two attributes with the same name. * Attribute names allow for distinguishing different attributes (such as
* between a PvP flag and an image storage attribute). A region cannot have
* two attributes with the same name.
* *
* @return the name of the attribute * @return the name of the attribute
*/ */
@ -104,13 +106,15 @@ public String getName() {
} }
/** /**
* Set the name of an attribute. Remember that the corresponding * Set the name of an attribute.
* {@link Region} must be made aware of this change or very bad * <p>
* things may happen. * Remember that the corresponding {@link Region} must be made aware of this
* change or very bad things may happen.
* <p> * <p>
* All valid non-empty Unicode strings are supported for names. * All valid non-empty Unicode strings are supported for names.
* *
* @param name new name to use * @param name
* new name to use
* @see Region#rename(Attribute, String) * @see Region#rename(Attribute, String)
*/ */
public void setName(String name) { public void setName(String name) {
@ -158,8 +162,12 @@ public int hashCode() {
*/ */
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) return false; if (obj == null) {
if (!(obj instanceof Attribute)) return false; return false;
}
if (!(obj instanceof Attribute)) {
return false;
}
return getName().equals(((Attribute) obj).getName()); return getName().equals(((Attribute) obj).getName());
} }