Trait

scala.math

ScalaNumericConversions

Related Doc: package math

Permalink

trait ScalaNumericConversions extends ScalaNumber with ScalaNumericAnyConversions

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

Linear Supertypes
ScalaNumericAnyConversions, ScalaNumber, Number, java.io.Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaNumericConversions
  2. ScalaNumericAnyConversions
  3. ScalaNumber
  4. Number
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def doubleValue(): Double

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

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

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

    Permalink

    returns

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

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

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

    Permalink
    Definition Classes
    ScalaNumericConversionsScalaNumericAnyConversions → ScalaNumber

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  5. def byteValue(): Byte

    Permalink
    Definition Classes
    Number
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  13. def isValidByte: Boolean

    Permalink

    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
  14. def isValidChar: Boolean

    Permalink

    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
  15. def isValidInt: Boolean

    Permalink

    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
  16. def isValidShort: Boolean

    Permalink

    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
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def shortValue(): Short

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

    Permalink
    Definition Classes
    AnyRef
  22. def toByte: Byte

    Permalink

    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
  23. def toChar: Char

    Permalink

    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
  24. def toDouble: Double

    Permalink

    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
  25. def toFloat: Float

    Permalink

    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
  26. def toInt: Int

    Permalink

    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
  27. def toLong: Long

    Permalink

    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
  28. def toShort: Short

    Permalink

    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
  29. def toString(): String

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

    Permalink

    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
  31. def unifiedPrimitiveHashcode(): Int

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ScalaNumber

Inherited from Number

Inherited from java.io.Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped