scala.math

ScalaNumericConversions

trait ScalaNumericConversions extends ScalaNumber with ScalaNumericAnyConversions

A slightly more specific conversion trait for classes which extend ScalaNumber (which excludes value classes.)

Source
ScalaNumericConversions.scala
Linear Supertypes
ScalaNumericAnyConversions, ScalaNumber, Number, java.io.Serializable, AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScalaNumericConversions
  2. ScalaNumericAnyConversions
  3. ScalaNumber
  4. Number
  5. Serializable
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def doubleValue(): Double

    Definition Classes
    ScalaNumericAnyConversions
  2. abstract def floatValue(): Float

    Definition Classes
    ScalaNumericAnyConversions
  3. abstract def intValue(): Int

    Definition Classes
    ScalaNumericAnyConversions
  4. abstract def isWhole(): Boolean

    returns

    true if this number has no decimal component, false otherwise.

    Definition Classes
    ScalaNumericAnyConversions
  5. abstract def longValue(): Long

    Definition Classes
    ScalaNumericAnyConversions
  6. abstract def underlying(): AnyRef

    Definition Classes
    ScalaNumericConversionsScalaNumericAnyConversions → ScalaNumber

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to any2stringadd[ScalaNumericConversions] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ScalaNumericConversions, B)

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to ArrowAssoc[ScalaNumericConversions] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def byteValue(): Byte

    Definition Classes
    Number
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensuring(cond: (ScalaNumericConversions) ⇒ Boolean, msg: ⇒ Any): ScalaNumericConversions

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to Ensuring[ScalaNumericConversions] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (ScalaNumericConversions) ⇒ Boolean): ScalaNumericConversions

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to Ensuring[ScalaNumericConversions] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): ScalaNumericConversions

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to Ensuring[ScalaNumericConversions] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): ScalaNumericConversions

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to Ensuring[ScalaNumericConversions] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to StringFormat[ScalaNumericConversions] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def isValidByte: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  21. def isValidChar: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  22. def isValidInt: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  23. def isValidShort: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def shortValue(): Short

    Definition Classes
    Number
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toByte: Byte

    Returns the value of this as a scala.Byte.

    Returns the value of this as a scala.Byte. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  30. def toChar: Char

    Returns the value of this as a scala.Char.

    Returns the value of this as a scala.Char. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  31. def toDouble: Double

    Returns the value of this as a scala.Double.

    Returns the value of this as a scala.Double. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  32. def toFloat: Float

    Returns the value of this as a scala.Float.

    Returns the value of this as a scala.Float. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  33. def toInt: Int

    Returns the value of this as an scala.Int.

    Returns the value of this as an scala.Int. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  34. def toLong: Long

    Returns the value of this as a scala.Long.

    Returns the value of this as a scala.Long. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  35. def toShort: Short

    Returns the value of this as a scala.Short.

    Returns the value of this as a scala.Short. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. def unifiedPrimitiveEquals(x: Any): Boolean

    Should only be called after all known non-primitive types have been excluded.

    Should only be called after all known non-primitive types have been excluded. This method won't dispatch anywhere else after checking against the primitives to avoid infinite recursion between equals and this on unknown "Number" variants.

    Additionally, this should only be called if the numeric type is happy to be converted to Long, Float, and Double. If for instance a BigInt much larger than the Long range is sent here, it will claim equality with whatever Long is left in its lower 64 bits. Or a BigDecimal with more precision than Double can hold: same thing. There's no way given the interface available here to prevent this error.

    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  38. def unifiedPrimitiveHashcode(): Int

    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  39. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def [B](y: B): (ScalaNumericConversions, B)

    Implicit information
    This member is added by an implicit conversion from ScalaNumericConversions to ArrowAssoc[ScalaNumericConversions] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from ScalaNumber

Inherited from Number

Inherited from java.io.Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ScalaNumericConversions to any2stringadd[ScalaNumericConversions]

Inherited by implicit conversion StringFormat from ScalaNumericConversions to StringFormat[ScalaNumericConversions]

Inherited by implicit conversion Ensuring from ScalaNumericConversions to Ensuring[ScalaNumericConversions]

Inherited by implicit conversion ArrowAssoc from ScalaNumericConversions to ArrowAssoc[ScalaNumericConversions]

Ungrouped