You are right that all you have to do. Other methods in Ordered will use their default implementations, which look like this:
def < (that: A): Boolean = (this compare that) < 0 def > (that: A): Boolean = (this compare that) > 0 def <= (that: A): Boolean = (this compare that) <= 0 def >= (that: A): Boolean = (this compare that) >= 0 def compareTo(that: A): Int = compare(that)
The only thing that does not have a default implementation in Ordered is a comparison, which you will define using the old compareTo method. Should work if the above is what you want for other comparisons.
source share