This is relative to JScience v3.3-Beta (Feb. 15, 2007 build).
Consistent as used here is the meaning described in the Comparable interface's
The javax.measure.quantities.Scalar<Q>.equals() implementation would return true
to the question "Is 2cm equal to 2km" because it ignores the unit settings, only
using the amounts (2 and 2). Also equals(Object that) is not consistent with
compareTo(Quantity<Q> that), because compareTo() compares this and that
converted to the same units.
As in Issue #45 ("Measure equals() is not consistent with compareTo()"), I would
lean towards the layman's viewpoint for equals(). For example that "1000m" is
equal to "1km". Also that it is desirable for equals() and compareTo() to be
It seems desirable for Scalar and Measure to have equivalent implementations for
equals() and compareTo().