public final class JsLong extends JsNumber implements Comparable<JsLong>
Modifier and Type | Field and Description |
---|---|
static fun.optic.Prism<JsValue,Long> |
prism
prism between the sum type JsValue and JsLong
|
static int |
TYPE_ID |
long |
value
The long primitive.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JsLong o)
Compares two
JsLong objects numerically. |
boolean |
equals(Object that)
Indicates whether some other object is "equal to" this json long.
|
int |
hashCode()
Returns the hashcode of this json long.
|
int |
id() |
boolean |
isLong()
Returns this JsValue as a JsLong
|
JsLong |
map(LongUnaryOperator fn)
Maps this json long into another one.
|
static JsLong |
of(long n)
Static factory method to create a JsLong from a long primitive type.
|
boolean |
test(LongPredicate predicate)
Tests the value of this json long 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, isDouble, isFalse, isInstant, isInstant, isInt, isInt, isIntegral, isJson, 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,Long> prism
public final long value
public static JsLong of(long n)
n
- the long primitive typepublic boolean isLong()
JsValue
public int compareTo(JsLong o)
JsLong
objects numerically.compareTo
in interface Comparable<JsLong>
Long.compareTo(Long)
public int hashCode()
public boolean equals(Object that)
public String toString()
toString
in class Object
Long.toString
public JsLong map(LongUnaryOperator fn)
fn
- the mapping functionpublic boolean test(LongPredicate predicate)
predicate
- the predicateCopyright © 2022. All rights reserved.