Package jsonvalues
Class JsBool
java.lang.Object
jsonvalues.JsPrimitive
jsonvalues.JsBool
- All Implemented Interfaces:
JsValue
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this JSON boolean.inthashCode()Returns the hashcode of this JSON boolean.booleanisBool()Returns true if this JsValue is a JsBool.booleanisFalse()Returns true if this JsValue is a JsBool and its value is false.booleanisTrue()Returns true if this JsValue is a JsBool and its value is true.static JsBoolof(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, 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, 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:JsValueReturns this JsValue as a JsPrimitive.- Returns:
- This JsValue as a JsPrimitive.
-
isBool
public boolean isBool()Description copied from interface:JsValueReturns true if this JsValue is a JsBool.- Returns:
- True if this JsValue is a JsBool.
-
isTrue
public boolean isTrue()Description copied from interface:JsValueReturns 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:JsValueReturns 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
-