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