Class BigInt
java.lang.Object
com.oracle.truffle.js.runtime.BigInt
- All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject,Comparable<BigInt>
public final class BigInt
extends Object
implements Comparable<BigInt>, com.oracle.truffle.api.interop.TruffleObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()intintintcompareValueTo(double b) intcompareValueTo(long b) BigInt[]doublestatic doubledoubleValueOf(BigInteger value) booleanbooleanbooleanstatic BigIntfromBigInteger(BigInteger value) static BigIntfromForeignBigInteger(BigInteger value) inthashCode()intintValue()booleanlonglongnegate()not()pow(int e) shiftLeft(int b) shiftRight(int b) intsignum()booleantestBit(int n) toString()toString(int radix) com.oracle.truffle.api.strings.TruffleStringcom.oracle.truffle.api.strings.TruffleStringtoTString(int radix) static BigIntvalueOf(long i) static BigIntstatic BigIntvalueOfUnsigned(long i)
-
Field Details
-
ZERO
-
ONE
-
NEGATIVE_ONE
-
TWO
-
MAX_INT
-
MIN_INT
-
-
Constructor Details
-
BigInt
-
-
Method Details
-
fromBigInteger
-
fromForeignBigInteger
-
valueOf
-
valueOf
-
valueOfUnsigned
-
intValue
public int intValue() -
doubleValue
public double doubleValue() -
doubleValueOf
-
bigIntegerValue
-
toBigInt64
-
toBigUint64
-
pow
-
mod
-
compareTo
- Specified by:
compareToin interfaceComparable<BigInt>
-
compareValueTo
public int compareValueTo(long b) -
compareValueTo
public int compareValueTo(double b) -
subtract
-
add
-
toString
-
toTString
public com.oracle.truffle.api.strings.TruffleString toTString() -
toTString
public com.oracle.truffle.api.strings.TruffleString toTString(int radix) -
testBit
public boolean testBit(int n) -
signum
public int signum() -
negate
-
not
-
hashCode
-
equals
-
and
-
or
-
xor
-
multiply
-
divide
-
remainder
-
divideAndRemainder
-
shiftLeft
-
shiftRight
-
abs
-
longValueExact
public long longValueExact() -
longValue
public long longValue() -
toString
-
fitsInLong
public boolean fitsInLong() -
fitsInDouble
public boolean fitsInDouble() -
isForeign
public boolean isForeign() -
clearForeign
-
bitLength
public int bitLength()
-