Implement "Comparable".
@@ -24,7 +24,8 @@ import org.apache.commons.numbers.core.Precision;
* element.
*/
public class FP64 extends Number
- implements NativeOperators<FP64> {
+ implements NativeOperators<FP64>,
+ Comparable<FP64> {
/** Value. */
private final double value;
@@ -124,4 +125,10 @@ public class FP64 extends Number
public byte byteValue() {
return (byte) value;
}
+
+ /** {@inheritDoc} */
+ @Override
+ public int compareTo(FP64 other) {
+ return Double.compare(value, other.value);
+ }
}
