Author: bayard
Date: Tue Jul  4 23:33:33 2006
New Revision: 419176

URL: http://svn.apache.org/viewvc?rev=419176&view=rev
Log:
Added hashCode method for inner Token class as recommended by PMD

Modified:
    
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java

Modified: 
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java?rev=419176&r1=419175&r2=419176&view=diff
==============================================================================
--- 
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
 (original)
+++ 
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
 Tue Jul  4 23:33:33 2006
@@ -619,6 +619,15 @@
         }
 
         /**
+         * Returns a hashcode for the token equal to the 
+         * hashcode for the token's value. Thus 'TT' and 'TTTT' 
+         * will have the same hashcode. 
+         */
+        public int hashCode() {
+            return this.value.hashCode();
+        }
+
+        /**
          * Represents this token as a String.
          *
          * @return String representation of the token



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to