Package jsonvalues
Class JsBool
- java.lang.Object
-
- jsonvalues.JsBool
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object that)Indicates whether some other object is "equal to" this json boolean.inthashCode()Returns the hashcode of this json boolean.intid()booleanisBool()booleanisFalse()booleanisTrue()static JsBoolof(boolean b)Static factory method to create a JsBool from a boolean primitive type.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsonvalues.JsValue
ifNothing, ifNull, isArray, isArray, isBigDec, isBigDec, isBigInt, isBigInt, isBinary, isDecimal, isDouble, isDouble, isInstant, isInstant, isInt, isInt, isIntegral, isJson, isJson, isLong, isLong, isNothing, isNotJson, isNotNothing, isNotNull, isNotNumber, isNull, isNumber, isObj, isObj, isSameType, isStr, isStr, toJsArray, toJsBigDec, toJsBigInt, toJsBinary, toJsBool, toJsDouble, toJsInstant, toJsInt, toJsLong, toJsNumber, toJsObj, toJson, toJsStr
-
-
-
-
Field Detail
-
ID
public static final int ID
- See Also:
- Constant Field Values
-
FALSE
public static final JsBool FALSE
The singleton false value.
-
TRUE
public static final JsBool TRUE
The singleton true value.
-
prism
public static Prism<JsValue,java.lang.Boolean> prism
prism between the sum type JsValue and JsBool
-
value
public final boolean value
the boolean value.
-
-
Method Detail
-
of
public static JsBool of(boolean b)
Static factory method to create a JsBool from a boolean primitive type.
-
isBool
public boolean isBool()
-
isTrue
public boolean isTrue()
-
isFalse
public boolean isFalse()
-
hashCode
public int hashCode()
Returns the hashcode of this json boolean.- Overrides:
hashCodein classjava.lang.Object- Returns:
- 1 if true, 0 if false
-
equals
public boolean equals(java.lang.Object that)
Indicates whether some other object is "equal to" this json boolean.- Overrides:
equalsin classjava.lang.Object- Parameters:
that- the reference object with which to compare.- Returns:
- true if
thatis a JsBool with the same value asthisJsBool
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- "true" or "false"
-
-