public class JSBooleanObject extends JSObject
| Modifier and Type | Method and Description |
|---|---|
JSBooleanObject |
asBooleanObject()
Casts the current JavaScript object to
将当前的JavaScript对象转换为JSBooleanObject类型。 JSBooleanObject type.
|
boolean |
getBooleanValue()
Returns boolean value of the current JavaScript object if object represents a primitive boolean or Boolean object, otherwise throws
如果object表示原始的boolean或Boolean对象,则返回当前JavaScript对象的boolean值,否则抛出IllegalStateException。 IllegalStateException.
|
boolean |
isBooleanObject()
Indicates whether JavaScript value is a Boolean object.
指示JavaScript值是否为布尔对象。 |
java.lang.String |
toString() |
boolean |
valueOf()
Returns the primitive value of the Boolean object.
返回布尔对象的原始值。 |
asJavaObject, asObject, getContext, getOwnPropertyNames, getProperty, getPropertyNames, hasProperty, isJavaObject, isObject, removeProperty, setProperty, setProperty, toJSONStringasArray, asBoolean, asFunction, asNumber, asNumberObject, asString, asStringObject, getNumberValue, getStringValue, isArray, isBoolean, isFunction, isNull, isNumber, isNumberObject, isString, isStringObject, isUndefinedpublic boolean valueOf()
public boolean isBooleanObject()
JSValue
true, then the value can be casted to
JSBooleanObject type. For example:
if (value.isBooleanObject()) {
JSBooleanObject booleanObject = value.asBooleanObject();
}
isBooleanObject in class
JSValue
true when JavaScript value is a Boolean object.
当JavaScript值为布尔对象时。
public boolean getBooleanValue()
JSValue
IllegalStateException.
getBooleanValue in class
JSValue
public JSBooleanObject asBooleanObject()
JSValue
JSBooleanObject type. If the current object doesn't represent a Boolean object, the
IllegalStateException error is thrown.
asBooleanObject in class
JSValue