java.lang.Object
jsonvalues.JsPrimitive
jsonvalues.JsInstant
- All Implemented Interfaces:
Comparable<JsInstant>,JsValue
Represents an immutable instant. An instant is not part of the Json specification. It is serialized into
it's a string representation using ISO-8601 representation. A JsInstant and a JsStr are equals
if both represent the same date.
Instant a = Instant.now();
JsStr.of(a.toString()).equals(JsInstant.of(a)) // true
-
Field Summary
Fields -
Method Summary
Methods 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, 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
-
Field Details
-
prism
prism between the sum type JsValue and JsInstant -
value
-
-
Method Details
-
of
-
of
-
map
-
toJsPrimitive
- Specified by:
toJsPrimitivein interfaceJsValue
-
isInstant
public boolean isInstant()Description copied from interface:JsValueReturns true if this JsValue is a JsInstant or a JsString which value is a date formatted in ISO-8601 -
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<JsInstant>
-