You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2005/09/06 23:57:38 UTC

svn commit: r279140 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java

Author: scolebourne
Date: Tue Sep  6 14:57:36 2005
New Revision: 279140

URL: http://svn.apache.org/viewcvs?rev=279140&view=rev
Log:
Add javadoc, in line with Comparable, to indicate '1/2'.compareTo('2/4') = 0
bug 36527

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java?rev=279140&r1=279139&r2=279140&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/Fraction.java Tue Sep  6 14:57:36 2005
@@ -838,6 +838,10 @@
     /**
      * <p>Compares this object to another based on size.</p>
      *
+     * <p>Note: this class has a natural ordering that is inconsistent
+     * with equals, because, for example, equals treats 1/2 and 2/4 as
+     * different, whereas compareTo treats them as equal.
+     *
      * @param object  the object to compare to
      * @return -1 if this is less, 0 if equal, +1 if greater
      * @throws ClassCastException if the object is not a <code>Fraction</code>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org