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

DO NOT REPLY [Bug 36527] - compareTo is inconsistent with equals

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36527>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36527


scolebourne@joda.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From scolebourne@joda.org  2005-09-06 23:59 -------
This is correct behaviour for this class.
The commons-lang Fraction class represents a general purpose fraction
implementation where fractions such as 2/4 may be stored. Equals thus performs
correctly and treats 1/2 and 2/4 as different as they have different state.

For an alternative Fraction implementation see commons-math (upcoming v1.1?).
There the fraction is always reduced, and may be more in line with a
mathematicians thought processes.

Extra javadoc added to compareTo in line with Comparable.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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