1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-22 15:30:09 -08:00

Implement the comparable interface.

This commit is contained in:
Danila Fedorin 2017-09-16 00:18:43 -07:00
parent 0ff071e212
commit 14ac9c67f4

View File

@ -5,7 +5,7 @@ import org.nwapw.abacus.exception.ComputationInterruptedException;
/** /**
* An interface used to represent a number. * An interface used to represent a number.
*/ */
public abstract class NumberInterface { public abstract class NumberInterface implements Comparable<NumberInterface> {
/** /**
* Check if the thread was interrupted and * Check if the thread was interrupted and
@ -158,14 +158,6 @@ public abstract class NumberInterface {
return intPowInternal(exponent); return intPowInternal(exponent);
} }
/**
* Compares this number to another.
*
* @param number the number to compare to.
* @return same as Integer.compare();
*/
public abstract int compareTo(NumberInterface number);
/** /**
* Same as Math.signum(). * Same as Math.signum().
* *