scala
trait Ordered

[source: `scala/Ordered.scala`]

`` `trait` Ordered[a]
  `extends` AnyRef

  A class for totally ordered data. Note that since version 2006-07-24 this class is no longer covariant in a.

Author
  Martin Odersky
Version
  1.1, 2006-07-24

Direct Known Subclasses:
  Enumeration.Value, RichBoolean, RichByte, RichChar, RichDouble, RichFloat, RichInt, RichLong, RichShort, RichString

Method Summary
`def` | < (that : a) : Boolean
`def` | <= (that : a) : Boolean
`def` | > (that : a) : Boolean
`def` | >= (that : a) : Boolean
`abstract def` | compare (that : a) : Int Result of comparing `this` with operand `that`. returns `x` where `x < 0` iff `this < that` `x == 0` iff `this == that` `x > 0` iff `this > that`
`def` | compareTo (that : a) : Int

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`abstract` `def` compare(that : a) : Int

  Result of comparing `this` with operand `that`. returns `x` where `x < 0` iff `this < that` `x == 0` iff `this == that` `x > 0` iff `this > that`

`` `def` <(that : a) : Boolean

`` `def` >(that : a) : Boolean

`` `def` <=(that : a) : Boolean

`` `def` >=(that : a) : Boolean

`` `def` compareTo(that : a) : Int