Class/Object

argonaut

JsonNumber

Related Docs: object JsonNumber | package argonaut

Permalink

sealed abstract class JsonNumber extends AnyRef

JSON numbers with optimization by cases. Note: Javascript numbers are 64-bit decimals.

Source
JsonNumber.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonNumber
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def toBigDecimal: BigDecimal

    Permalink

    Returns this number as a BigDecimal.

  2. abstract def toLong: Option[Long]

    Permalink

    Returns this number as a Long, only if this number is a valid Long.

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 asJson: Json

    Permalink
  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(that: Any): Boolean

    Permalink
    Definition Classes
    JsonNumber → 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
    JsonNumber → AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toBigInt: Option[BigInt]

    Permalink

    Returns this number as a BigInt, only if this number is an integer.

  18. def toByte: Option[Byte]

    Permalink

    Returns this number as a Byte, only if this number is a valid Byte.

  19. lazy val toDouble: Option[Double]

    Permalink

    Returns this number as a Double, only if this number can be represented as a Double.

  20. lazy val toFloat: Option[Float]

    Permalink

    Returns this number as a Float, only if this number can be represented as a Float.

  21. def toInt: Option[Int]

    Permalink

    Returns this number as a Int, only if this number is a valid Int.

  22. def toShort: Option[Short]

    Permalink

    Returns this number as a Short, only if this number is a valid Short.

  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def truncateToBigInt: Option[BigInt]

    Permalink

    Truncates the number to a BigInt.

    Truncates the number to a BigInt. Truncation means that we round the real number towards 0 to the closest BigInt.

    Truncation fails for numbers whose decimal representation contains more than 2 ^ 18 digits, since creating BigInt values for these numbers is computationally expensive.

  25. def truncateToByte: Byte

    Permalink

    Truncates the number to a Byte.

    Truncates the number to a Byte. Truncation means that we round the real number towards 0 to the closest, valid Byte. So, if the number is 1e99, then this will return Byte.MaxValue.

  26. def truncateToDouble: Double

    Permalink

    Truncates this number to the best Double approximation to this number.

    Truncates this number to the best Double approximation to this number. Anything over Double.MaxValue gets rounded to Double.PositiveInfinity and anything below Double.MinValue gets rounded to Double.NegativeInfinity.

  27. def truncateToFloat: Float

    Permalink

    Truncates this number to the best Float approximation to this number.

    Truncates this number to the best Float approximation to this number. Anything over Float.MaxValue gets rounded to Float.PositiveInfinity and anything below Float.MinValue gets rounded to Float.NegativeInfinity.

  28. def truncateToInt: Int

    Permalink

    Truncates the number to a Int.

    Truncates the number to a Int. Truncation means that we round the real number towards 0 to the closest, valid Int. So, if the number is 1e99, then this will return Int.MaxValue.

  29. def truncateToLong: Long

    Permalink

    Truncates the number to a Long.

    Truncates the number to a Long. Truncation means that we round the real number towards 0 to the closest, valid Long. So, if the number is 1e99, then this will return Long.MaxValue.

  30. def truncateToShort: Short

    Permalink

    Truncates the number to a Short.

    Truncates the number to a Short. Truncation means that we round the real number towards 0 to the closest, valid Short. So, if the number is 1e99, then this will return Short.MaxValue.

  31. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped