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
- Alphabetic
- By Inheritance
- SafeLong
- Ordered
- Comparable
- ScalaNumericConversions
- ScalaNumericAnyConversions
- ScalaNumber
- Number
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def %(rhs: Long): SafeLong
- abstract def &(rhs: Long): SafeLong
- abstract def *(rhs: Long): SafeLong
- abstract def +(rhs: Long): SafeLong
- abstract def -(rhs: Long): SafeLong
- abstract def /(rhs: Long): SafeLong
- abstract def /%(rhs: Long): (SafeLong, SafeLong)
- abstract def <<(n: Int): SafeLong
- abstract def >>(n: Int): SafeLong
- abstract def ^(rhs: Long): SafeLong
- abstract def abs: SafeLong
- abstract def bitLength: Int
-
abstract
def
compare(that: SafeLong): Int
- Definition Classes
- Ordered
-
abstract
def
doubleValue(): Double
- Definition Classes
- ScalaNumericAnyConversions
-
abstract
def
floatValue(): Float
- Definition Classes
- ScalaNumericAnyConversions
- abstract def gcd(that: SafeLong): SafeLong
- abstract def getLong: Opt[Long]
-
abstract
def
intValue(): Int
- Definition Classes
- ScalaNumericAnyConversions
- abstract def isOne: Boolean
- abstract def isValidLong: Boolean
- abstract def isZero: Boolean
-
abstract
def
longValue(): Long
- Definition Classes
- ScalaNumericAnyConversions
- abstract def signum: Int
- abstract def toBigDecimal: BigDecimal
- abstract def unary_-(): SafeLong
-
abstract
def
underlying(): AnyRef
- Definition Classes
- ScalaNumericConversions → ScalaNumericAnyConversions → ScalaNumber
- abstract def |(rhs: Long): SafeLong
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- final def %(rhs: BigInt): SafeLong
- final def %(rhs: SafeLong): SafeLong
- final def &(rhs: BigInt): SafeLong
- final def &(rhs: SafeLong): SafeLong
- final def *(rhs: BigInt): SafeLong
- final def *(rhs: SafeLong): SafeLong
-
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).
- final def +(rhs: BigInt): SafeLong
- final def +(rhs: SafeLong): SafeLong
- final def -(rhs: BigInt): SafeLong
- final def -(rhs: SafeLong): SafeLong
- final def /(rhs: BigInt): SafeLong
- final def /(rhs: SafeLong): SafeLong
- final def /%(rhs: BigInt): (SafeLong, SafeLong)
- final def /%(rhs: SafeLong): (SafeLong, SafeLong)
- final def /~(rhs: SafeLong): SafeLong
-
def
<(that: SafeLong): Boolean
- Definition Classes
- Ordered
-
def
<=(that: SafeLong): Boolean
- Definition Classes
- Ordered
- def =!=(that: SafeLong): Boolean
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ===(that: SafeLong): Boolean
-
def
>(that: SafeLong): Boolean
- Definition Classes
- Ordered
-
def
>=(that: SafeLong): Boolean
- Definition Classes
- Ordered
- final def ^(rhs: BigInt): SafeLong
- final def ^(rhs: SafeLong): SafeLong
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
byteValue(): Byte
- Definition Classes
- Number
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
compareTo(that: SafeLong): Int
- Definition Classes
- Ordered → Comparable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isProbablePrime(c: Int): Boolean
-
def
isValidByte: Boolean
- Definition Classes
- ScalaNumericAnyConversions
-
def
isValidChar: Boolean
- Definition Classes
- ScalaNumericAnyConversions
-
def
isValidInt: Boolean
- Definition Classes
- ScalaNumericAnyConversions
-
def
isValidShort: Boolean
- Definition Classes
- ScalaNumericAnyConversions
-
final
def
isWhole(): Boolean
- Definition Classes
- SafeLong → ScalaNumericAnyConversions → ScalaNumber
- final def max(that: SafeLong): SafeLong
- final def min(that: SafeLong): SafeLong
- final def modPow(k: Int, mod: SafeLong): SafeLong
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- final def pow(k: Int): SafeLong
-
def
shortValue(): Short
- Definition Classes
- Number
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- final def toBigInt: BigInt
-
def
toByte: Byte
- Definition Classes
- SafeLong → ScalaNumericAnyConversions
-
def
toChar: Char
- Definition Classes
- ScalaNumericAnyConversions
-
def
toDouble: Double
- Definition Classes
- ScalaNumericAnyConversions
-
def
toFloat: Float
- Definition Classes
- ScalaNumericAnyConversions
-
def
toInt: Int
- Definition Classes
- SafeLong → ScalaNumericAnyConversions
-
def
toLong: Long
- Definition Classes
- ScalaNumericAnyConversions
-
def
toShort: Short
- Definition Classes
- SafeLong → ScalaNumericAnyConversions
-
def
toString(): String
- Definition Classes
- SafeLong → AnyRef → Any
-
def
unifiedPrimitiveEquals(x: Any): Boolean
- Attributes
- protected
- Definition Classes
- ScalaNumericAnyConversions
-
def
unifiedPrimitiveHashcode(): Int
- Attributes
- protected
- Definition Classes
- ScalaNumericAnyConversions
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- final def |(rhs: BigInt): SafeLong
- final def |(rhs: SafeLong): SafeLong