java.lang.Object
jsonvalues.JsPrimitive
jsonvalues.JsNumber
jsonvalues.JsBigInt
- All Implemented Interfaces:
Comparable<JsBigInt>,JsValue
Represents an immutable JSON number of type BigInteger.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final fun.optic.Prism<JsValue,BigInteger> final BigIntegerthe big integer value. -
Method Summary
Modifier and TypeMethodDescriptionintCompares twoJsBigIntobjects numerically.booleanIndicates whether some other object is "equal to" this JSON big integer.inthashCode()Returns the hashcode of this JSON big integer.booleanisBigInt()Returns true if this JsValue is a JsBigIntmap(UnaryOperator<BigInteger> fn) Maps this JSON bigint into another one.static JsBigIntof(BigInteger n) Static factory method to create a JsBigInt from BigInteger objects.booleantest(Predicate<BigInteger> predicate) Tests the value of this JSON bigint on a predicate.toString()Methods inherited from class jsonvalues.JsNumber
isNumber, toJsPrimitiveMethods inherited from class jsonvalues.JsPrimitive
isJson, isPrimitiveMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jsonvalues.JsValue
ifNothing, ifNull, isArray, isArray, isBigDec, isBigDec, isBigInt, isBinary, isBool, isDecimal, isDouble, isDouble, isFalse, isInstant, isInstant, isInt, isInt, isIntegral, isJson, isLong, isLong, isNothing, isNotNothing, isNotNull, isNotNumber, isNull, isObj, isObj, isSameType, isStr, isStr, isTrue, toJsArray, toJsBigDec, toJsBigInt, toJsBinary, toJsBool, toJsDouble, toJsInstant, toJsInt, toJsLong, toJsNumber, toJsObj, toJson, toJsStr
-
Field Details
-
prism
-
value
the big integer value.
-
-
Method Details
-
of
Static factory method to create a JsBigInt from BigInteger objects.- Parameters:
n- the big integer- Returns:
- a new JsBigInt
-
isBigInt
public boolean isBigInt()Description copied from interface:JsValueReturns true if this JsValue is a JsBigInt -
compareTo
Compares twoJsBigIntobjects numerically.- Specified by:
compareToin interfaceComparable<JsBigInt>- See Also:
-
hashCode
public int hashCode()Returns the hashcode of this JSON big integer. -
equals
Indicates whether some other object is "equal to" this JSON big integer. Numbers of different types are equals if they have the same value. -
toString
-
map
Maps this JSON bigint into another one.- Parameters:
fn- the mapping function- Returns:
- a new JsBigInt
-
test
Tests the value of this JSON bigint on a predicate.- Parameters:
predicate- the predicate- Returns:
- true if this big integer satisfies the predicate
-