Packages

t

scala.math.Ordering

OptionOrdering

trait OptionOrdering[T] extends Ordering[Option[T]]

Source
Ordering.scala
Linear Supertypes
Ordering[Option[T]], PartialOrdering[Option[T]], Equiv[Option[T]], Serializable, java.io.Serializable, Comparator[Option[T]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OptionOrdering
  2. Ordering
  3. PartialOrdering
  4. Equiv
  5. Serializable
  6. Serializable
  7. Comparator
  8. AnyRef
  9. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Ops extends AnyRef

    This inner class defines comparison operators available for T.

    This inner class defines comparison operators available for T.

    Definition Classes
    Ordering

Abstract Value Members

  1. abstract def optionOrdering: Ordering[T]

Concrete Value Members

  1. def compare(x: Option[T], y: Option[T]): Int

    Returns an integer whose sign communicates how x compares to y.

    Returns an integer whose sign communicates how x compares to y.

    The result sign has the following meaning:

    • negative if x < y
    • positive if x > y
    • zero otherwise (if x == y)
    Definition Classes
    OptionOrderingOrdering → Comparator
  2. def equals(obj: Any): Boolean

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    OptionOrdering → Comparator → AnyRef → Any
  3. def equiv(x: Option[T], y: Option[T]): Boolean

    Return true if x == y in the ordering.

    Return true if x == y in the ordering.

    Definition Classes
    OrderingPartialOrderingEquiv
  4. def gt(x: Option[T], y: Option[T]): Boolean

    Return true if x > y in the ordering.

    Return true if x > y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  5. def gteq(x: Option[T], y: Option[T]): Boolean

    Return true if x >= y in the ordering.

    Return true if x >= y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  6. def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

    Definition Classes
    OptionOrdering → AnyRef → Any
  7. def lt(x: Option[T], y: Option[T]): Boolean

    Return true if x < y in the ordering.

    Return true if x < y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  8. def lteq(x: Option[T], y: Option[T]): Boolean

    Return true if x <= y in the ordering.

    Return true if x <= y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  9. def max(x: Option[T], y: Option[T]): Option[T]

    Return x if x >= y, otherwise y.

    Return x if x >= y, otherwise y.

    Definition Classes
    Ordering
  10. def min(x: Option[T], y: Option[T]): Option[T]

    Return x if x <= y, otherwise y.

    Return x if x <= y, otherwise y.

    Definition Classes
    Ordering
  11. implicit def mkOrderingOps(lhs: Option[T]): Ops

    This implicit method augments T with the comparison operators defined in scala.math.Ordering.Ops.

    This implicit method augments T with the comparison operators defined in scala.math.Ordering.Ops.

    Definition Classes
    Ordering
  12. def on[U](f: (U) ⇒ Option[T]): Ordering[U]

    Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

    Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

    def compare(x:U, y:U) = Ordering[T].compare(f(x), f(y))
    Definition Classes
    Ordering
  13. def reverse: Ordering[Option[T]]

    Return the opposite ordering of this one.

    Return the opposite ordering of this one.

    Definition Classes
    OrderingPartialOrdering
  14. def reversed(): Comparator[Option[T]]
    Definition Classes
    Comparator
  15. def thenComparing[U <: Comparable[_ >: U]](arg0: java.util.function.Function[_ >: Option[T], _ <: U]): Comparator[Option[T]]
    Definition Classes
    Comparator
  16. def thenComparing[U](arg0: java.util.function.Function[_ >: Option[T], _ <: U], arg1: Comparator[_ >: U]): Comparator[Option[T]]
    Definition Classes
    Comparator
  17. def thenComparing(arg0: Comparator[_ >: Option[T]]): Comparator[Option[T]]
    Definition Classes
    Comparator
  18. def thenComparingDouble(arg0: ToDoubleFunction[_ >: Option[T]]): Comparator[Option[T]]
    Definition Classes
    Comparator
  19. def thenComparingInt(arg0: ToIntFunction[_ >: Option[T]]): Comparator[Option[T]]
    Definition Classes
    Comparator
  20. def thenComparingLong(arg0: ToLongFunction[_ >: Option[T]]): Comparator[Option[T]]
    Definition Classes
    Comparator
  21. def tryCompare(x: Option[T], y: Option[T]): Some[Int]

    Returns whether a comparison between x and y is defined, and if so the result of compare(x, y).

    Returns whether a comparison between x and y is defined, and if so the result of compare(x, y).

    Definition Classes
    OrderingPartialOrdering