From dfec8f3aed7aec417cedee3d06bf220c6acf4afd Mon Sep 17 00:00:00 2001
From: Stephen Colebourne
Date: Sat, 31 Aug 2002 10:51:02 +0000
Subject: [PATCH] Improve checkstyle report
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137000 13f79535-47bb-0310-9956-ffa450edef68
---
src/java/org/apache/commons/lang/enum/Enum.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/commons/lang/enum/Enum.java b/src/java/org/apache/commons/lang/enum/Enum.java
index c41bc4d56..0c0d6221a 100644
--- a/src/java/org/apache/commons/lang/enum/Enum.java
+++ b/src/java/org/apache/commons/lang/enum/Enum.java
@@ -115,7 +115,7 @@ import java.util.Map;
*
*
* @author Stephen Colebourne
- * @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 {
/**
@@ -131,9 +131,14 @@ public abstract class Enum implements Comparable, Serializable {
* Enable the iterator to retain the source code order
*/
private static class Entry {
+ /** Map of Enum name to Enum */
final Map map = new HashMap(50);
+ /** List of Enums in source code order */
final List list = new ArrayList(25);
+ /**
+ * Restrictive constructor
+ */
private Entry() {
}
}
@@ -162,6 +167,7 @@ public abstract class Enum implements Comparable, Serializable {
/**
* Handle the deserialization of the class to ensure that multiple
* copies are not wastefully created, or illegal enum types created.
+ * @return the resolved object
*/
protected Object readResolve() {
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.
*
* @param other the other object to compare for equality
+ * @return true if the Enums are equal
*/
public final boolean equals(Object other) {
if (other == this) {