public interface IV8Value extends IJavetClosable, IV8Cloneable
Modifier and Type | Method and Description |
---|---|
default boolean |
asBoolean()
A simulation of the JS
if (variable) |
default double |
asDouble()
As double.
|
default int |
asInt()
As int.
|
default long |
asLong()
As long.
|
default java.lang.String |
asString()
As string.
|
boolean |
equals(V8Value v8Value)
Equals.
|
V8Runtime |
getV8Runtime()
Gets V8 runtime.
|
default boolean |
isNull()
Is null.
|
default boolean |
isNullOrUndefined()
Is null or undefined.
|
default boolean |
isUndefined()
Is undefined.
|
boolean |
sameValue(V8Value v8Value)
Same value.
|
boolean |
strictEquals(V8Value v8Value)
Strict equals.
|
close, isClosed
toClone, toClone
default boolean asBoolean() throws JavetException
if (variable)
JavetException
- the javet exceptiondefault double asDouble() throws JavetException
JavetException
- the javet exceptiondefault int asInt() throws JavetException
JavetException
- the javet exceptiondefault long asLong() throws JavetException
JavetException
- the javet exceptiondefault java.lang.String asString() throws JavetException
JavetException
- the javet exceptionboolean equals(V8Value v8Value) throws JavetException
The behavior is different from JS behavior but is the same as Java behavior.
v8Value
- the V8 valueJavetException
- the javet exceptionV8Runtime getV8Runtime()
default boolean isNull()
default boolean isNullOrUndefined()
default boolean isUndefined()
boolean sameValue(V8Value v8Value) throws JavetException
The behavior is different from JS behavior but is the same as Java behavior.
v8Value
- the V8 valueJavetException
- the javet exceptionboolean strictEquals(V8Value v8Value) throws JavetException
The behavior is different from JS behavior but is the same as Java behavior.
v8Value
- the V8 valueJavetException
- the javet exception