Package jsonvalues
Class JsBool
java.lang.Object
jsonvalues.JsPrimitive
jsonvalues.JsBool
- All Implemented Interfaces:
JsValue
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this JSON boolean.int
hashCode()
Returns the hashcode of this JSON boolean.boolean
isBool()
Returns true if this JsValue is a JsBool.boolean
isFalse()
Returns true if this JsValue is a JsBool and its value is false.boolean
isTrue()
Returns true if this JsValue is a JsBool and its value is true.static JsBool
of
(boolean b) Static factory method to create a JsBool from a boolean primitive type.Returns this JsValue as a JsPrimitive.toString()
Methods inherited from class jsonvalues.JsPrimitive
isJson, isPrimitive
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, isLong, isLong, isNothing, isNotNothing, isNotNull, isNotNumber, isNull, isNumber, isObj, isObj, isSameType, isStr, isStr, toJsArray, toJsBigDec, toJsBigInt, toJsBinary, toJsBool, toJsDouble, toJsInstant, toJsInt, toJsLong, toJsNumber, toJsObj, toJson, toJsStr
-
Field Details
-
FALSE
The singleton false value. -
TRUE
The singleton true value. -
prism
prism between the sum type JsValue and JsBool -
value
public final boolean valuethe boolean value.
-
-
Method Details
-
of
Static factory method to create a JsBool from a boolean primitive type. -
toJsPrimitive
Description copied from interface:JsValue
Returns this JsValue as a JsPrimitive.- Returns:
- This JsValue as a JsPrimitive.
-
isBool
public boolean isBool()Description copied from interface:JsValue
Returns true if this JsValue is a JsBool.- Returns:
- True if this JsValue is a JsBool.
-
isTrue
public boolean isTrue()Description copied from interface:JsValue
Returns true if this JsValue is a JsBool and its value is true.- Returns:
- True if this JsValue is a JsBool and its value is true.
-
isFalse
public boolean isFalse()Description copied from interface:JsValue
Returns true if this JsValue is a JsBool and its value is false.- Returns:
- True if this JsValue is a JsBool and its value is false.
-
hashCode
public int hashCode()Returns the hashcode of this JSON boolean. -
equals
Indicates whether some other object is "equal to" this JSON boolean. -
toString
-