Improve checkstyle report

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2002-08-31 10:51:02 +00:00
parent 2257a019e4
commit dfec8f3aed
1 changed files with 8 additions and 1 deletions

View File

@ -115,7 +115,7 @@ import java.util.Map;
* </p> * </p>
* *
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a> * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
* @version $Id: Enum.java,v 1.1 2002/08/11 23:17:54 scolebourne Exp $ * @version $Id: Enum.java,v 1.2 2002/08/31 10:51:02 scolebourne Exp $
*/ */
public abstract class Enum implements Comparable, Serializable { public abstract class Enum implements Comparable, Serializable {
/** /**
@ -131,9 +131,14 @@ public abstract class Enum implements Comparable, Serializable {
* Enable the iterator to retain the source code order * Enable the iterator to retain the source code order
*/ */
private static class Entry { private static class Entry {
/** Map of Enum name to Enum */
final Map map = new HashMap(50); final Map map = new HashMap(50);
/** List of Enums in source code order */
final List list = new ArrayList(25); final List list = new ArrayList(25);
/**
* Restrictive constructor
*/
private Entry() { private Entry() {
} }
} }
@ -162,6 +167,7 @@ public abstract class Enum implements Comparable, Serializable {
/** /**
* Handle the deserialization of the class to ensure that multiple * Handle the deserialization of the class to ensure that multiple
* copies are not wastefully created, or illegal enum types created. * copies are not wastefully created, or illegal enum types created.
* @return the resolved object
*/ */
protected Object readResolve() { protected Object readResolve() {
return Enum.getEnum(getClass(), getName()); return Enum.getEnum(getClass(), getName());
@ -262,6 +268,7 @@ public abstract class Enum implements Comparable, Serializable {
* Identity is tested for first, so this method usually runs fast. * Identity is tested for first, so this method usually runs fast.
* *
* @param other the other object to compare for equality * @param other the other object to compare for equality
* @return true if the Enums are equal
*/ */
public final boolean equals(Object other) { public final boolean equals(Object other) {
if (other == this) { if (other == this) {