public final class JsInstant extends JsPrimitive implements Comparable<JsInstant>
Instant a = Instant.now();
JsStr.of(a.toString()).equals(JsInstant.of(a)) // true
Modifier and Type | Field and Description |
---|---|
static fun.optic.Prism<JsValue,Instant> |
prism
prism between the sum type JsValue and JsInstant
|
static int |
TYPE_ID |
Instant |
value |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JsInstant o) |
boolean |
equals(Object o) |
int |
hashCode() |
int |
id() |
boolean |
isInstant()
Returns true if this JsValue is a JsInstant or a JsString which value is a
date formatted in ISO-8601
|
JsInstant |
map(Function<Instant,Instant> fn) |
static JsInstant |
of(Instant instant) |
static JsInstant |
of(String instant) |
JsPrimitive |
toJsPrimitive() |
String |
toString() |
isJson, isPrimitive
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ifNothing, ifNull, isArray, isArray, isBigDec, isBigDec, isBigInt, isBigInt, isBinary, isBool, isDecimal, isDouble, isDouble, isFalse, isInstant, isInt, isInt, isIntegral, isJson, isLong, isLong, isNothing, isNotNothing, isNotNull, isNotNumber, isNull, isNumber, 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,Instant> prism
public final Instant value
public JsPrimitive toJsPrimitive()
toJsPrimitive
in interface JsValue
public boolean isInstant()
JsValue
public int compareTo(JsInstant o)
compareTo
in interface Comparable<JsInstant>
Copyright © 2022. All rights reserved.