public final class V8ValueInteger extends V8ValueNumber<java.lang.Integer> implements IV8ValuePrimitiveValue<V8ValueIntegerObject>
valueOBJECT_CONVERTER, v8Runtime| Constructor and Description |
|---|
V8ValueInteger(V8Runtime v8Runtime)
Instantiates a new V8 value integer.
|
V8ValueInteger(V8Runtime v8Runtime,
int value)
Instantiates a new V8 value integer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
A simulation of the JS
if (variable) |
int |
asInt()
As int.
|
V8ValueInteger |
toClone(boolean referenceCopy)
Get a clone of the current V8 value.
|
V8ValueIntegerObject |
toObject()
Convert the primitive value to the primitive object.
|
int |
toPrimitive()
To primitive int.
|
java.lang.String |
toString() |
java.lang.String |
toString(int radix)
Number.prototype.toString()
The toString() method of Number values returns a string representing this number value.
|
close, equals, getValue, isEmpty, isPresent, sameValue, strictEqualscheckV8Runtime, getV8Runtime, isClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasDouble, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEqualsclose, isClosedtoClonepublic V8ValueInteger(V8Runtime v8Runtime) throws JavetException
v8Runtime - the V8 runtimeJavetException - the javet exceptionpublic V8ValueInteger(V8Runtime v8Runtime, int value) throws JavetException
v8Runtime - the V8 runtimevalue - the valueJavetException - the javet exceptionpublic boolean asBoolean()
IV8Valueif (variable)public int asInt()
IV8Valuepublic V8ValueInteger toClone(boolean referenceCopy) throws JavetException
IV8CloneabletoClone in interface IV8CloneablereferenceCopy - the reference copyJavetException - the javet exceptionpublic V8ValueIntegerObject toObject() throws JavetException
IV8ValuePrimitiveValuetoObject in interface IV8ValuePrimitiveValue<V8ValueIntegerObject>JavetException - the javet exceptionpublic int toPrimitive()
public java.lang.String toString()
toString in class V8ValuePrimitive<java.lang.Integer>public java.lang.String toString(int radix)
radix - An integer in the range 2 through 36 specifying the base to use for representing the number value.
Defaults to 10.