object Int128 extends VersionSpecificInt128Integral with Serializable
Container for a 128 bit signed integer stored in big-endian format. Adopted from the original work available at https://github.com/PlatformLab/TorcDB/blob/master/src/main/java/net/ellitron/torc/util/Int128.java by Jonathan Ellithorpe (jde@cs.stanford.edu)
- Alphabetic
- By Inheritance
- Int128
- Serializable
- VersionSpecificInt128Integral
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val MaxValue: Int128
- val MinValue: Int128
- def apply(value: Array[Byte]): Int128
Constructs a Int128 from a byte array value.
Constructs a Int128 from a byte array value. The byte array value is interpreted as unsigned and in big-endian format. If the byte array is less than 16 bytes, then the higher order bytes of the resulting Int128 are padded with 0s. If the byte array is greater than 16 bytes, then the lower 16 bytes are used.
- value
Byte array in big-endian format.
- def apply(value: UUID): Int128
Constructs a Int128 from a UUID value.
Constructs a Int128 from a UUID value. The value stored in this Int128 is the 128 bit two's-complement representation of this value. If the two's-complement representation of the value requires more than 128 bits to represent, only the lower 128 bits are used to construct this Int128.
- value
128-bit UUID value
- def apply(value: String): Int128
Constructs a Int128 from a String value representing a number in base 10.
Constructs a Int128 from a String value representing a number in base 10. The value stored in this Int128 is the 128 bit two's-complement representation of this value. If the two's-complement representation of the value requires more than 128 bits to represent, only the lower 128 bits are used to construct this Int128.
- value
Base 10 format String, treated as a 128 bit signed value.
- def apply(value: String, radix: Int): Int128
Constructs a Int128 from a String value representing a number in a specified base.
Constructs a Int128 from a String value representing a number in a specified base. The value stored in this Int128 is the 128 bit two's-complement representation of this value. If the two's-complement representation of the value requires more than 128 bits to represent, only the lower 128 bits are used to construct this Int128.
- value
String, treated as a 128 bit signed value.
- radix
The base of the number represented by the string.
- def apply(value: BigInt): Int128
Constructs a Int128 from a BigInteger value.
Constructs a Int128 from a BigInteger value. The value used to construct the Int128 is the 128-bit two's complement representation of the BigInteger. In the case that the number of bits in the minimal two's-complement representation of the BigInteger is greater than 128, then the lower 128 bits are used and higher order bits are discarded.
- value
BigInteger, treated as a 128 bit signed value.
- def apply(value: Long): Int128
Constructs a Int128 from a Long value.
Constructs a Int128 from a Long value.
- value
Long
- def apply(value: Int): Int128
Constructs a Int128 from an Integer value.
Constructs a Int128 from an Integer value.
- value
Int
- def apply(value: Short): Int128
Constructs a Int128 from a Short value.
Constructs a Int128 from a Short value.
- value
Short
- def apply(value: Byte): Int128
Constructs a Int128 from a Byte value.
Constructs a Int128 from a Byte value.
- value
Byte
- def apply(upperLong: Long, lowerLong: Long): Int128
Constructs a Int128 from two longs, one representing the upper 64 bits and the other representing the lower 64 bits.
Constructs a Int128 from two longs, one representing the upper 64 bits and the other representing the lower 64 bits.
- upperLong
Upper 64 bits.
- lowerLong
Lower 64 bits.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def decode(n: Any): Try[Int128]
This method attempts to translate its argument into a Int128.
This method attempts to translate its argument into a Int128.
- n
Number to translate.
- returns
Int128
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- implicit def int2Int128(i: Int): Int128
Implicit conversion from
InttoBigInt. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def javaBigInteger2Int128(x: BigInteger): Int128
Implicit conversion from
java.math.BigIntegertoInt128. - implicit def long2Int128(l: Long): Int128
Implicit conversion from
LongtoBigInt. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numBytes: Int
- def parseFromByteBuffer(buf: ByteBuffer): Int128
Parses a Int128 from a ByteBuffer.
Parses a Int128 from a ByteBuffer. The ByteBuffer is expected to have at least 16 bytes at the current position, storing a Int128 in big-endian order. This method will also advance the current position of the ByteBuffer by 16 bytes.
- buf
ByteBuffer containing the value in big-endian format at the current position of the buffer.
- implicit def scalaBigInt2Int128(x: BigInt): Int128
Implicit conversion from
scala.math.BigInttoInt128. - val size: Int
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit object Int128Integral extends Int128IsIntegral with Int128Ordering
An implicit providing both Integral and Ordering characteristics to Int128
An implicit providing both Integral and Ordering characteristics to Int128
- Definition Classes
- VersionSpecificInt128Integral