public final class V8ValueBoolean extends V8ValuePrimitive<java.lang.Boolean> implements IV8ValuePrimitiveValue<V8ValueBooleanObject>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FALSE
The constant FALSE.
|
static java.lang.String |
TRUE
The constant TRUE.
|
value
OBJECT_CONVERTER, v8Runtime
Constructor and Description |
---|
V8ValueBoolean(V8Runtime v8Runtime)
Instantiates a new V8 value boolean.
|
V8ValueBoolean(V8Runtime v8Runtime,
boolean value)
Instantiates a new V8 value boolean.
|
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean()
A simulation of the JS
if (variable) |
int |
asInt()
As int.
|
V8ValueBoolean |
toClone(boolean referenceCopy)
Get a clone of the current V8 value.
|
V8ValueBooleanObject |
toObject()
Convert the primitive value to the primitive object.
|
boolean |
toPrimitive()
To primitive boolean.
|
java.lang.String |
toString() |
close, equals, getValue, isEmpty, isPresent, sameValue, strictEquals
checkV8Runtime, getV8Runtime, isClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asDouble, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close, isClosed
toClone
public static final java.lang.String FALSE
public static final java.lang.String TRUE
public V8ValueBoolean(V8Runtime v8Runtime) throws JavetException
v8Runtime
- the V8 runtimeJavetException
- the javet exceptionpublic V8ValueBoolean(V8Runtime v8Runtime, boolean value) throws JavetException
v8Runtime
- the V8 runtimevalue
- the valueJavetException
- the javet exceptionpublic boolean asBoolean()
IV8Value
if (variable)
public int asInt()
IV8Value
public V8ValueBoolean toClone(boolean referenceCopy) throws JavetException
IV8Cloneable
toClone
in interface IV8Cloneable
referenceCopy
- the reference copyJavetException
- the javet exceptionpublic V8ValueBooleanObject toObject() throws JavetException
IV8ValuePrimitiveValue
toObject
in interface IV8ValuePrimitiveValue<V8ValueBooleanObject>
JavetException
- the javet exceptionpublic boolean toPrimitive()
public java.lang.String toString()
toString
in class V8ValuePrimitive<java.lang.Boolean>