Comparable<JsBigInt>
, JsElem
, JsNumber
public final class JsBigInt extends Object implements JsNumber, Comparable<JsBigInt>
Modifier and Type | Field | Description |
---|---|---|
BigInteger |
x |
the big integer value.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(JsBigInt o) |
Compares two
JsBigInt objects numerically. |
boolean |
equals(@Nullable Object that) |
Indicates whether some other object is "equal to" this json big integer.
|
int |
hashCode() |
Returns the hashcode of this json big integer.
|
JsBigInt |
map(UnaryOperator<BigInteger> fn) |
Maps this json bigint into another one.
|
static JsBigInt |
of(BigInteger n) |
Static factory method to create a JsBigInt from BigInteger objects.
|
boolean |
test(Predicate<BigInteger> predicate) |
Tests the value of this json bigint on a predicate.
|
String |
toString() |
asJsArray, asJsBigDec, asJsBigInt, asJsBool, asJsDouble, asJsInt, asJsLong, asJsObj, asJson, asJsStr, isArray, isArray, isBigDec, isBigDec, isBigInt, isBigInt, isBool, isDouble, isDouble, isFalse, isInstant, isInstant, isInt, isInt, isIntegral, isJson, isJson, isLocalDate, isLocalDate, isLocalDateTime, isLocalDateTime, isLong, isLong, isNothing, isNotJson, isNotNothing, isNotNull, isNotNumber, isNull, isNumber, isObj, isObj, isStr, isStr, isTrue
public final BigInteger x
public int compareTo(JsBigInt o)
JsBigInt
objects numerically.compareTo
in interface Comparable<JsBigInt>
compareTo(JsBigInt)
public boolean equals(@Nullable Object that)
JsBigInt.parse(BigInteger.ONE).equals(JsBigInt.parse(BigInteger.ONE))
JsBigInt.parse(BigInteger.ONE).equals(JsInt.parse(1))
JsBigInt.parse(BigInteger.ONE).equals(JsDouble.parse(1.0))
JsBigInt.parse(BigInteger.ONE).equals(JsBigDec.parse(BigDecimal.valueOf(1.0)))
JsBigInt.parse(BigInteger.ONE).equals(JsLong.parse(1))
public int hashCode()
public JsBigInt map(UnaryOperator<BigInteger> fn)
fn
- the mapping functionpublic boolean test(Predicate<BigInteger> predicate)
predicate
- the predicatepublic static JsBigInt of(BigInteger n)
n
- the big integerpublic String toString()
toString
in class Object
BigInteger.toString
Copyright © 2019. All rights reserved.