public class V8ValueArray extends V8ValueObject implements IV8ValueArray
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FUNCTION_KEYS |
protected static java.lang.String |
FUNCTION_NEXT |
protected static java.lang.String |
PROPERTY_DONE |
protected static java.lang.String |
PROPERTY_VALUE |
ERROR_THE_KEY_VALUE_PAIR_MUST_MATCH, FUNCTION_ADD, FUNCTION_DELETE, FUNCTION_GET, FUNCTION_HAS, FUNCTION_SET, METHOD_PREFIX_GET, METHOD_PREFIX_IS, METHOD_PREFIX_SET, PROPERTY_PROTOTYPE
handle, INVALID_HANDLE, weak
OBJECT_CONVERTER, v8Runtime
FUNCTION_FLAT, FUNCTION_POP, FUNCTION_PUSH, FUNCTION_SHIFT, FUNCTION_UNSHIFT
DEFAULT_BATCH_SIZE, MIN_BATCH_SIZE
Modifier and Type | Method and Description |
---|---|
int |
asInt()
As int.
|
int |
batchGet(V8Value[] v8Values,
int startIndex,
int endIndex)
Batch get the given range of items from the array.
|
<Value extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetUniConsumer<Value,E> consumer)
Invoke the uni-consumer for each of the keys.
|
<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)
Invoke the uni-indexed-consumer for each of the keys.
|
<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.
|
V8ValueReferenceType |
getType() |
batchGet, bind, bindFunction, bindProperty, delete, deletePrivateProperty, forEach, forEach, get, getBoolean, getDouble, getIdentityHash, getInteger, getLong, getOwnPropertyNames, getPrivateProperty, getProperty, getPropertyNames, getPrototype, getString, has, hasInternalType, hasOwnProperty, hasPrivateProperty, invokeExtended, invokeExtended, sameValue, set, set, setBoolean, setDouble, setInteger, setLong, setNull, setPrivateProperty, setProperty, setPrototype, setString, setUndefined, strictEquals, toJsonString, toProtoString, unbind, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindProperty
addReference, checkV8Runtime, clearWeak, close, close, equals, getHandle, isClosed, isWeak, isWeak, removeReference, setWeak, toClone, toString
getV8Runtime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
batchGet, flat, flat, pop, popBigInteger, popBoolean, popDouble, popInteger, popLong, popNull, popObject, popPrimitive, popString, popUndefined, popZonedDateTime, push, pushNull, pushUndefined, shift, shiftBigInteger, shiftBoolean, shiftDouble, shiftInteger, shiftLong, shiftNull, shiftObject, shiftPrimitive, shiftString, shiftUndefined, shiftZonedDateTime, toArray, unshift, unshiftNull, unshiftUndefined
batchGet, bind, bindFunction, bindFunction, bindFunction, bindProperty, bindProperty, delete, deleteNull, deletePrivateProperty, deleteUndefined, 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, isClosed, isWeak, isWeak, setWeak
asBoolean, asDouble, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close
toClone, toClone
protected static final java.lang.String FUNCTION_KEYS
protected static final java.lang.String FUNCTION_NEXT
protected static final java.lang.String PROPERTY_DONE
protected static final java.lang.String PROPERTY_VALUE
public int asInt() throws JavetException
IV8Value
asInt
in interface IV8Value
JavetException
- the javet exceptionpublic int batchGet(V8Value[] v8Values, int startIndex, int endIndex) throws JavetException
IV8ValueArray
batchGet
in interface IV8ValueArray
v8Values
- the V8 valuesstartIndex
- the start indexendIndex
- the end indexJavetException
- the javet exceptionpublic <Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniConsumer<Value,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Value
- the type of keyE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniConsumer<Value,E> consumer, int batchSize) throws JavetException, E extends java.lang.Throwable
IV8ValueArray
forEach
in interface IV8ValueArray
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
public <Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniIndexedConsumer<Value,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Value
- the type of keyE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniIndexedConsumer<Value,E> consumer, int batchSize) throws JavetException, E extends java.lang.Throwable
IV8ValueArray
forEach
in interface IV8ValueArray
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 public <T extends V8Value> T get(int index) throws JavetException
IV8ValueArray
get
in interface IV8ValueArray
T
- the type parameterindex
- the indexJavetException
- the javet exceptionpublic java.util.List<java.lang.Integer> getKeys() throws JavetException
IV8ValueArray
getKeys
in interface IV8ValueArray
JavetException
- the javet exceptionpublic int getLength() throws JavetException
IV8ValueArray
getLength
in interface IV8ValueArray
JavetException
- the javet exceptionpublic V8ValueReferenceType getType()
getType
in interface IV8ValueReference
getType
in class V8ValueObject