You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2006/07/05 08:33:34 UTC

svn commit: r419176 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java

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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org