public interface IV8ValueArray extends IV8ValueObject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FUNCTION_FLAT
The constant FUNCTION_FLAT.
|
static java.lang.String |
FUNCTION_POP
The constant FUNCTION_POP.
|
static java.lang.String |
FUNCTION_PUSH
The constant FUNCTION_PUSH.
|
static java.lang.String |
FUNCTION_SHIFT
The constant FUNCTION_SHIFT.
|
static java.lang.String |
FUNCTION_UNSHIFT
The constant FUNCTION_UNSHIFT.
|
DEFAULT_BATCH_SIZE, MIN_BATCH_SIZE
Modifier and Type | Method and Description |
---|---|
default <T extends V8Value> |
batchGet()
Batch get all the items from the array.
|
int |
batchGet(V8Value[] v8Values,
int startIndex,
int endIndex)
Batch get the given range of items from the array.
|
default IV8ValueArray |
flat()
Array.prototype.flat().
|
default IV8ValueArray |
flat(int depth)
Array.prototype.flat().
|
<Value extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetUniConsumer<Value,E> consumer,
int batchSize)
For each of the item, call the consumer and return the item count.
|
<Value extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetUniIndexedConsumer<Value,E> consumer,
int batchSize)
For each of the item, call the consumer and return the item count.
|
<T extends V8Value> |
get(int index)
Get V8 value by index.
|
java.util.List<java.lang.Integer> |
getKeys()
Gets keys.
|
int |
getLength()
Gets length.
|
default <T extends V8Value> |
pop()
Array.prototype.pop().
|
default java.math.BigInteger |
popBigInteger()
Pop big integer from the array.
|
default java.lang.Boolean |
popBoolean()
Pop boolean from the array.
|
default java.lang.Double |
popDouble()
Pop double from the array.
|
default java.lang.Integer |
popInteger()
Pop integer from the array.
|
default java.lang.Long |
popLong()
Pop long from the array.
|
default V8ValueNull |
popNull()
Pop V8 value null.
|
default <T> T |
popObject()
Pop object from the array.
|
default <R,T extends V8ValuePrimitive<R>> |
popPrimitive()
Pop primitive from the array.
|
default java.lang.String |
popString()
Pop string from the array.
|
default V8ValueUndefined |
popUndefined()
Pop V8 value undefined.
|
default java.time.ZonedDateTime |
popZonedDateTime()
Pop zoned date time from the array.
|
default int |
push(java.lang.Object... objects)
Array.prototype.push().
|
default int |
pushNull()
Push null to the array.
|
default int |
pushUndefined()
Push undefined to the array.
|
default <T extends V8Value> |
shift()
Array.prototype.shift().
|
default java.math.BigInteger |
shiftBigInteger()
Shift big integer from the array.
|
default java.lang.Boolean |
shiftBoolean()
Shift boolean from the array.
|
default java.lang.Double |
shiftDouble()
Shift double from the array.
|
default java.lang.Integer |
shiftInteger()
Shift integer from the array.
|
default java.lang.Long |
shiftLong()
Shift long from the array.
|
default V8ValueNull |
shiftNull()
Shift V8 value null.
|
default <T> T |
shiftObject()
Shift object from the array.
|
default <R,T extends V8ValuePrimitive<R>> |
shiftPrimitive()
Shift primitive from the array.
|
default java.lang.String |
shiftString()
Shift string from the array.
|
default V8ValueUndefined |
shiftUndefined()
Shift V8 value undefined.
|
default java.time.ZonedDateTime |
shiftZonedDateTime()
Shift zoned date time from the array.
|
default V8Value[] |
toArray()
To V8 value array.
|
default int |
unshift(java.lang.Object... objects)
Array.prototype.unshift().
|
default int |
unshiftNull()
Unshift null to the array.
|
default int |
unshiftUndefined()
Unshift undefined to the array.
|
batchGet, bind, bindFunction, bindFunction, bindFunction, bindProperty, bindProperty, delete, deleteNull, deletePrivateProperty, deleteUndefined, forEach, forEach, forEach, forEach, forEach, forEach, get, getBigInteger, getBoolean, getDouble, getFloat, getIdentityHash, getInteger, getLong, getNull, getObject, getOwnPropertyNames, getOwnPropertyNameStrings, getPrivateProperty, getPrivatePropertyBoolean, getPrivatePropertyDouble, getPrivatePropertyFloat, getPrivatePropertyInteger, getPrivatePropertyLong, getPrivatePropertyNull, getPrivatePropertyObject, getPrivatePropertyPrimitive, getPrivatePropertyString, getPrivatePropertyUndefined, getPrivatePropertyZonedDateTime, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyFloat, getPropertyInteger, getPropertyLong, getPropertyNames, getPropertyObject, getPropertyPrimitive, getPropertyString, getPropertyZonedDateTime, getPrototype, getString, getUndefined, getZonedDateTime, has, hasInternalType, hasNull, hasOwnProperty, hasPrivateProperty, hasUndefined, invoke, invoke, invokeBigInteger, invokeBoolean, invokeDouble, invokeExtended, invokeExtended, invokeFloat, invokeInteger, invokeLong, invokeObject, invokeString, invokeVoid, invokeVoid, invokeZonedDateTime, isGeneratorObject, set, set, setBoolean, setDouble, setInteger, setLong, setNull, setPrivateProperty, setPrivatePropertyNull, setPrivatePropertyUndefined, setProperty, setPropertyNull, setPropertyUndefined, setPrototype, setString, setUndefined, toJsonString, toProtoString, unbind, unbindFunction, unbindFunction, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindProperty
clearWeak, close, getHandle, getType, isClosed, isWeak, isWeak, setWeak
asBoolean, asDouble, asInt, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close
toClone, toClone
static final java.lang.String FUNCTION_FLAT
static final java.lang.String FUNCTION_SHIFT
static final java.lang.String FUNCTION_UNSHIFT
static final java.lang.String FUNCTION_POP
static final java.lang.String FUNCTION_PUSH
int batchGet(V8Value[] v8Values, int startIndex, int endIndex) throws JavetException
v8Values
- the V8 valuesstartIndex
- the start indexendIndex
- the end indexJavetException
- the javet exceptiondefault <T extends V8Value> T[] batchGet() throws JavetException
T
- the type parameterJavetException
- the javet exception@CheckReturnValue default IV8ValueArray flat() throws JavetException
JavetException
- the javet exception@CheckReturnValue default IV8ValueArray flat(int depth) throws JavetException
depth
- the depth level specifying how deep a nested array structure should be flattened. Defaults to 1.JavetException
- the javet exception<Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniConsumer<Value,E> consumer, int batchSize) throws JavetException, E extends java.lang.Throwable
forEach
in interface IV8ValueObject
Value
- the type parameterE
- the type parameterconsumer
- the consumerbatchSize
- the batch sizeJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
<Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniIndexedConsumer<Value,E> consumer, int batchSize) throws JavetException, E extends java.lang.Throwable
forEach
in interface IV8ValueObject
Value
- the type parameterE
- the type parameterconsumer
- the consumerbatchSize
- the batch sizeJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
@CheckReturnValue <T extends V8Value> T get(int index) throws JavetException
T
- the type parameterindex
- the indexJavetException
- the javet exceptionjava.util.List<java.lang.Integer> getKeys() throws JavetException
JavetException
- the javet exceptionint getLength() throws JavetException
JavetException
- the javet exception@CheckReturnValue default <T extends V8Value> T pop() throws JavetException
T
- the type parameterJavetException
- the javet exceptiondefault java.math.BigInteger popBigInteger() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Boolean popBoolean() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Double popDouble() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Integer popInteger() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Long popLong() throws JavetException
JavetException
- the javet exceptiondefault V8ValueNull popNull() throws JavetException
JavetException
- the javet exceptiondefault <T> T popObject() throws JavetException
T
- the type parameterJavetException
- the javet exceptiondefault <R,T extends V8ValuePrimitive<R>> R popPrimitive() throws JavetException
R
- the type parameterT
- the type parameterJavetException
- the javet exceptiondefault java.lang.String popString() throws JavetException
JavetException
- the javet exceptiondefault V8ValueUndefined popUndefined() throws JavetException
JavetException
- the javet exceptiondefault java.time.ZonedDateTime popZonedDateTime() throws JavetException
JavetException
- the javet exceptiondefault int push(java.lang.Object... objects) throws JavetException
objects
- the objectsJavetException
- the javet exceptiondefault int pushNull() throws JavetException
JavetException
- the javet exceptiondefault int pushUndefined() throws JavetException
JavetException
- the javet exception@CheckReturnValue default <T extends V8Value> T shift() throws JavetException
T
- the type parameterJavetException
- the javet exceptiondefault java.math.BigInteger shiftBigInteger() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Boolean shiftBoolean() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Double shiftDouble() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Integer shiftInteger() throws JavetException
JavetException
- the javet exceptiondefault java.lang.Long shiftLong() throws JavetException
JavetException
- the javet exceptiondefault V8ValueNull shiftNull() throws JavetException
JavetException
- the javet exceptiondefault <T> T shiftObject() throws JavetException
T
- the type parameterJavetException
- the javet exceptiondefault <R,T extends V8ValuePrimitive<R>> R shiftPrimitive() throws JavetException
R
- the type parameterT
- the type parameterJavetException
- the javet exceptiondefault java.lang.String shiftString() throws JavetException
JavetException
- the javet exceptiondefault V8ValueUndefined shiftUndefined() throws JavetException
JavetException
- the javet exceptiondefault java.time.ZonedDateTime shiftZonedDateTime() throws JavetException
JavetException
- the javet exception@CheckReturnValue default V8Value[] toArray() throws JavetException
JavetException
- the javet exceptiondefault int unshift(java.lang.Object... objects) throws JavetException
objects
- the objectsJavetException
- the javet exceptiondefault int unshiftNull() throws JavetException
JavetException
- the javet exceptiondefault int unshiftUndefined() throws JavetException
JavetException
- the javet exception