public final class JsBigDec extends JsNumber implements Comparable<JsBigDec>
Modifier and Type | Field and Description |
---|---|
static fun.optic.Prism<JsValue,BigDecimal> |
prism
prism between the sum type JsValue and JsBigDec
|
static int |
TYPE_ID |
BigDecimal |
value
The big decimal value
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JsBigDec o)
Compares two
JsBigDec objects numerically |
boolean |
equals(Object that)
Indicates whether some other object is "equal to" this json big decimal.
|
int |
hashCode()
Returns the hashcode of this json big decimal
|
int |
id() |
boolean |
isBigDec()
Returns true if this JsValue is a JsBigDec
|
static void |
main(String[] args) |
JsBigDec |
map(UnaryOperator<BigDecimal> fn)
Maps this JsBigDec into another one
|
static JsBigDec |
of(BigDecimal n)
Static factory method to create a JsBigDec from a BigDecimal object.
|
boolean |
test(Predicate<BigDecimal> predicate)
Tests the value of this json big-decimal on a predicate
|
String |
toString() |
isNumber, toJsPrimitive
isJson, isPrimitive
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ifNothing, ifNull, isArray, isArray, isBigDec, isBigInt, 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
public static final int TYPE_ID
public static final fun.optic.Prism<JsValue,BigDecimal> prism
public final BigDecimal value
public static JsBigDec of(BigDecimal n)
n
- the big decimalpublic boolean isBigDec()
JsValue
public int compareTo(JsBigDec o)
JsBigDec
objects numericallycompareTo
in interface Comparable<JsBigDec>
compareTo(JsBigDec)
public int hashCode()
public boolean equals(Object that)
public String toString()
toString
in class Object
BigDecimal.toString
public JsBigDec map(UnaryOperator<BigDecimal> fn)
fn
- the mapping functionpublic boolean test(Predicate<BigDecimal> predicate)
predicate
- the predicatepublic static void main(String[] args)
Copyright © 2022. All rights reserved.