Packages

implicit object ShortIsIntegral extends ShortIsIntegral with ShortOrdering

Source
Numeric.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ShortIsIntegral
  2. ShortOrdering
  3. ShortIsIntegral
  4. Integral
  5. Numeric
  6. Ordering
  7. PartialOrdering
  8. Equiv
  9. Serializable
  10. Serializable
  11. Comparator
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class IntegralOps extends Ops
    Definition Classes
    Integral
  2. class Ops extends AnyRef
    Definition Classes
    Numeric

Value Members

  1. def abs(x: Short): Short
    Definition Classes
    Numeric
  2. def compare(x: Short, y: Short): 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
    ShortOrderingOrdering → Comparator
  3. def equiv(x: Short, y: Short): Boolean

    Return true if x == y in the ordering.

    Return true if x == y in the ordering.

    Definition Classes
    OrderingPartialOrderingEquiv
  4. def fromInt(x: Int): Short
    Definition Classes
    ShortIsIntegralNumeric
  5. def gt(x: Short, y: Short): Boolean

    Return true if x > y in the ordering.

    Return true if x > y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  6. def gteq(x: Short, y: Short): Boolean

    Return true if x >= y in the ordering.

    Return true if x >= y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  7. def lt(x: Short, y: Short): Boolean

    Return true if x < y in the ordering.

    Return true if x < y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  8. def lteq(x: Short, y: Short): Boolean

    Return true if x <= y in the ordering.

    Return true if x <= y in the ordering.

    Definition Classes
    OrderingPartialOrdering
  9. def max(x: Short, y: Short): Short

    Return x if x >= y, otherwise y.

    Return x if x >= y, otherwise y.

    Definition Classes
    Ordering
  10. def min(x: Short, y: Short): Short

    Return x if x <= y, otherwise y.

    Return x if x <= y, otherwise y.

    Definition Classes
    Ordering
  11. def minus(x: Short, y: Short): Short
    Definition Classes
    ShortIsIntegralNumeric
  12. implicit def mkNumericOps(lhs: Short): IntegralOps
    Definition Classes
    IntegralNumeric
  13. implicit def mkOrderingOps(lhs: Short): ShortIsIntegral.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
  14. def negate(x: Short): Short
    Definition Classes
    ShortIsIntegralNumeric
  15. def on[U](f: (U) ⇒ Short): 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
  16. def one: Short
    Definition Classes
    Numeric
  17. def orElse(other: Ordering[Short]): Ordering[Short]

    Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result of others compare function.

    Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result of others compare function.

    other

    an Ordering to use if this Ordering returns zero

    Definition Classes
    Ordering
    Example:
    1. case class Pair(a: Int, b: Int)
      
      val pairOrdering = Ordering.by[Pair, Int](_.a)
                                 .orElse(Ordering.by[Pair, Int](_.b))
  18. def orElseBy[S](f: (Short) ⇒ S)(implicit ord: Ordering[S]): Ordering[Short]

    Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

    Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

    Ordering[S].compare(f(x), f(y))

    This function is equivalent to passing the result of Ordering.by(f) to orElse.

    Definition Classes
    Ordering
    Example:
    1. case class Pair(a: Int, b: Int)
      
      val pairOrdering = Ordering.by[Pair, Int](_.a)
                                 .orElseBy[Int](_.b)
  19. def parseString(str: String): Option[Short]
    Definition Classes
    ShortIsIntegralNumeric
  20. def plus(x: Short, y: Short): Short
    Definition Classes
    ShortIsIntegralNumeric
  21. def quot(x: Short, y: Short): Short
    Definition Classes
    ShortIsIntegralIntegral
  22. def rem(x: Short, y: Short): Short
    Definition Classes
    ShortIsIntegralIntegral
  23. def reverse: Ordering[Short]

    Return the opposite ordering of this one.

    Return the opposite ordering of this one.

    Definition Classes
    OrderingPartialOrdering
  24. def reversed(): Comparator[Short]
    Definition Classes
    Comparator
  25. def signum(x: Short): Int
    Definition Classes
    Numeric
  26. def thenComparing[U <: Comparable[_ >: U]](arg0: java.util.function.Function[_ >: Short, _ <: U]): Comparator[Short]
    Definition Classes
    Comparator
  27. def thenComparing[U](arg0: java.util.function.Function[_ >: Short, _ <: U], arg1: Comparator[_ >: U]): Comparator[Short]
    Definition Classes
    Comparator
  28. def thenComparing(arg0: Comparator[_ >: Short]): Comparator[Short]
    Definition Classes
    Comparator
  29. def thenComparingDouble(arg0: ToDoubleFunction[_ >: Short]): Comparator[Short]
    Definition Classes
    Comparator
  30. def thenComparingInt(arg0: ToIntFunction[_ >: Short]): Comparator[Short]
    Definition Classes
    Comparator
  31. def thenComparingLong(arg0: ToLongFunction[_ >: Short]): Comparator[Short]
    Definition Classes
    Comparator
  32. def times(x: Short, y: Short): Short
    Definition Classes
    ShortIsIntegralNumeric
  33. def toDouble(x: Short): Double
    Definition Classes
    ShortIsIntegralNumeric
  34. def toFloat(x: Short): Float
    Definition Classes
    ShortIsIntegralNumeric
  35. def toInt(x: Short): Int
    Definition Classes
    ShortIsIntegralNumeric
  36. def toLong(x: Short): Long
    Definition Classes
    ShortIsIntegralNumeric
  37. def tryCompare(x: Short, y: Short): 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
  38. def zero: Short
    Definition Classes
    Numeric