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