Packages

sealed abstract class SafeLong extends ScalaNumber with ScalaNumericConversions with Ordered[SafeLong]

Provides a type to do safe long arithmetic. This type will never overflow, but rather convert the underlying long to a BigInteger as need and back down to a Long when possible.

Self Type
SafeLong
Linear Supertypes
Ordered[SafeLong], Comparable[SafeLong], ScalaNumericConversions, ScalaNumericAnyConversions, ScalaNumber, java.lang.Number, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SafeLong
  2. Ordered
  3. Comparable
  4. ScalaNumericConversions
  5. ScalaNumericAnyConversions
  6. ScalaNumber
  7. Number
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def %(rhs: Long): SafeLong
  2. abstract def &(rhs: Long): SafeLong
  3. abstract def *(rhs: Long): SafeLong
  4. abstract def +(rhs: Long): SafeLong
  5. abstract def -(rhs: Long): SafeLong
  6. abstract def /(rhs: Long): SafeLong
  7. abstract def /%(rhs: Long): (SafeLong, SafeLong)
  8. abstract def <<(n: Int): SafeLong
  9. abstract def >>(n: Int): SafeLong
  10. abstract def ^(rhs: Long): SafeLong
  11. abstract def abs: SafeLong
  12. abstract def bitLength: Int
  13. abstract def compare(that: SafeLong): Int
    Definition Classes
    Ordered
  14. abstract def doubleValue(): Double
    Definition Classes
    ScalaNumericAnyConversions
  15. abstract def floatValue(): Float
    Definition Classes
    ScalaNumericAnyConversions
  16. abstract def gcd(that: SafeLong): SafeLong
  17. abstract def getLong: Opt[Long]
  18. abstract def intValue(): Int
    Definition Classes
    ScalaNumericAnyConversions
  19. abstract def isOne: Boolean
  20. abstract def isValidLong: Boolean
  21. abstract def isZero: Boolean
  22. abstract def longValue(): Long
    Definition Classes
    ScalaNumericAnyConversions
  23. abstract def signum: Int
  24. abstract def toBigDecimal: BigDecimal
  25. abstract def unary_-(): SafeLong
  26. abstract def underlying(): AnyRef
    Definition Classes
    ScalaNumericConversions → ScalaNumericAnyConversions → ScalaNumber
  27. abstract def |(rhs: Long): SafeLong

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def %(rhs: BigInt): SafeLong
  4. final def %(rhs: SafeLong): SafeLong
  5. final def &(rhs: BigInt): SafeLong
  6. final def &(rhs: SafeLong): SafeLong
  7. final def *(rhs: BigInt): SafeLong
  8. final def *(rhs: SafeLong): SafeLong
  9. final def **(k: Int): SafeLong

    Exponentiation function, e.g.

    Exponentiation function, e.g. x ** y

    If base ** exponent doesn't fit in a Long, the result will overflow (unlike scala.math.pow which will return +/- Infinity).

  10. final def +(rhs: BigInt): SafeLong
  11. final def +(rhs: SafeLong): SafeLong
  12. final def -(rhs: BigInt): SafeLong
  13. final def -(rhs: SafeLong): SafeLong
  14. final def /(rhs: BigInt): SafeLong
  15. final def /(rhs: SafeLong): SafeLong
  16. final def /%(rhs: BigInt): (SafeLong, SafeLong)
  17. final def /%(rhs: SafeLong): (SafeLong, SafeLong)
  18. final def /~(rhs: SafeLong): SafeLong
  19. def <(that: SafeLong): Boolean
    Definition Classes
    Ordered
  20. def <=(that: SafeLong): Boolean
    Definition Classes
    Ordered
  21. def =!=(that: SafeLong): Boolean
  22. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def ===(that: SafeLong): Boolean
  24. def >(that: SafeLong): Boolean
    Definition Classes
    Ordered
  25. def >=(that: SafeLong): Boolean
    Definition Classes
    Ordered
  26. final def ^(rhs: BigInt): SafeLong
  27. final def ^(rhs: SafeLong): SafeLong
  28. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  29. def byteValue(): Byte
    Definition Classes
    Number
  30. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def compareTo(that: SafeLong): Int
    Definition Classes
    Ordered → Comparable
  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  34. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. final def isProbablePrime(c: Int): Boolean
  39. def isValidByte: Boolean
    Definition Classes
    ScalaNumericAnyConversions
  40. def isValidChar: Boolean
    Definition Classes
    ScalaNumericAnyConversions
  41. def isValidInt: Boolean
    Definition Classes
    ScalaNumericAnyConversions
  42. def isValidShort: Boolean
    Definition Classes
    ScalaNumericAnyConversions
  43. final def isWhole(): Boolean
    Definition Classes
    SafeLong → ScalaNumericAnyConversions → ScalaNumber
  44. final def max(that: SafeLong): SafeLong
  45. final def min(that: SafeLong): SafeLong
  46. final def modPow(k: Int, mod: SafeLong): SafeLong
  47. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. final def notify(): Unit
    Definition Classes
    AnyRef
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  50. final def pow(k: Int): SafeLong
  51. def shortValue(): Short
    Definition Classes
    Number
  52. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  53. final def toBigInt: BigInt
  54. def toByte: Byte
    Definition Classes
    SafeLong → ScalaNumericAnyConversions
  55. def toChar: Char
    Definition Classes
    ScalaNumericAnyConversions
  56. def toDouble: Double
    Definition Classes
    ScalaNumericAnyConversions
  57. def toFloat: Float
    Definition Classes
    ScalaNumericAnyConversions
  58. def toInt: Int
    Definition Classes
    SafeLong → ScalaNumericAnyConversions
  59. def toLong: Long
    Definition Classes
    ScalaNumericAnyConversions
  60. def toShort: Short
    Definition Classes
    SafeLong → ScalaNumericAnyConversions
  61. def toString(): String
    Definition Classes
    SafeLong → AnyRef → Any
  62. def unifiedPrimitiveEquals(x: Any): Boolean
    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  63. def unifiedPrimitiveHashcode(): Int
    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  64. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def |(rhs: BigInt): SafeLong
  68. final def |(rhs: SafeLong): SafeLong

Inherited from Ordered[SafeLong]

Inherited from Comparable[SafeLong]

Inherited from ScalaNumericConversions

Inherited from ScalaNumericAnyConversions

Inherited from ScalaNumber

Inherited from java.lang.Number

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped