public class V8ValueMap extends V8ValueObject implements IV8ValueMap
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_ENTRIES, FUNCTION_KEYS, FUNCTION_VALUES
DEFAULT_BATCH_SIZE, MIN_BATCH_SIZE
Modifier and Type | Method and Description |
---|---|
V8ValueArray |
asArray()
As array.
|
void |
clear()
Clear.
|
boolean |
delete(java.lang.Object key)
Delete property by key object.
|
<Key extends V8Value,Value extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetBiConsumer<Key,Value,E> consumer)
Invoke the bi-consumer for each of the keys.
|
<Key extends V8Value,Value extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetBiIndexedConsumer<Key,Value,E> consumer)
Invoke the bi-indexed-consumer for each of the keys.
|
<Key extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetUniConsumer<Key,E> consumer)
Invoke the uni-consumer for each of the keys.
|
<Key extends V8Value,E extends java.lang.Throwable> |
forEach(IJavetUniIndexedConsumer<Key,E> consumer)
Invoke the uni-indexed-consumer for each of the keys.
|
<T extends V8Value> |
get(java.lang.Object key)
Get property value by key object.
|
java.lang.Boolean |
getBoolean(java.lang.Object key)
Gets property value as boolean by key object.
|
java.lang.Double |
getDouble(java.lang.Object key)
Gets property value as double by key object.
|
java.lang.Integer |
getInteger(java.lang.Object key)
Gets property value as integer by key object.
|
java.lang.Long |
getLong(java.lang.Object key)
Gets property value as long by key object.
|
int |
getSize() |
java.lang.String |
getString(java.lang.Object key)
Gets string by key object.
|
V8ValueReferenceType |
getType() |
boolean |
has(java.lang.Object value)
Has object property key by key object.
|
boolean |
set(java.lang.Object... keysAndValues)
Set property by pairs of key object and value object.
|
boolean |
set(java.lang.Object key,
java.lang.Object value)
Set property by key object and value object.
|
boolean |
setBoolean(java.lang.Object key,
java.lang.Boolean value)
Set property by key object and value boolean.
|
boolean |
setDouble(java.lang.Object key,
java.lang.Double value)
Set property by key object and value double.
|
boolean |
setInteger(java.lang.Object key,
java.lang.Integer value)
Set property by key object and value integer.
|
boolean |
setLong(java.lang.Object key,
java.lang.Long value)
Set property by key object and value long.
|
boolean |
setNull(java.lang.Object key)
Set property to null by key object.
|
boolean |
setString(java.lang.Object key,
java.lang.String value)
Set property by key object and value string.
|
boolean |
setUndefined(java.lang.Object key)
Set property to undefined by key object.
|
batchGet, bind, bindFunction, bindProperty, deletePrivateProperty, forEach, forEach, getIdentityHash, getOwnPropertyNames, getPrivateProperty, getProperty, getPropertyNames, getPrototype, hasInternalType, hasOwnProperty, hasPrivateProperty, invokeExtended, invokeExtended, sameValue, setPrivateProperty, setProperty, setPrototype, 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
getEntries, getKeys, getValues
batchGet, bind, bindFunction, bindFunction, bindFunction, bindProperty, bindProperty, deleteNull, deletePrivateProperty, deleteUndefined, forEach, forEach, forEach, forEach, getBigInteger, getFloat, getIdentityHash, 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, getUndefined, getZonedDateTime, hasInternalType, hasNull, hasOwnProperty, hasPrivateProperty, hasUndefined, invoke, invoke, invokeBigInteger, invokeBoolean, invokeDouble, invokeExtended, invokeExtended, invokeFloat, invokeInteger, invokeLong, invokeObject, invokeString, invokeVoid, invokeVoid, invokeZonedDateTime, isGeneratorObject, setPrivateProperty, setPrivatePropertyNull, setPrivatePropertyUndefined, setProperty, setPropertyNull, setPropertyUndefined, setPrototype, toJsonString, toProtoString, unbind, unbindFunction, unbindFunction, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindProperty
clearWeak, close, getHandle, isClosed, isWeak, isWeak, setWeak
asBoolean, asDouble, asInt, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close
toClone, toClone
@CheckReturnValue public V8ValueArray asArray() throws JavetException
IV8ValueMap
asArray
in interface IV8ValueMap
JavetException
- the javet exceptionpublic void clear() throws JavetException
IV8ValueMap
clear
in interface IV8ValueMap
JavetException
- the javet exceptionpublic boolean delete(java.lang.Object key) throws JavetException
IV8ValueObject
delete
in interface IV8ValueObject
delete
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic <Key extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniConsumer<Key,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Key
- the type of keyE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <Key extends V8Value,E extends java.lang.Throwable> int forEach(IJavetUniIndexedConsumer<Key,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Key
- the type of keyE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <Key extends V8Value,Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetBiConsumer<Key,Value,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Key
- the type of keyValue
- the type of valueE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <Key extends V8Value,Value extends V8Value,E extends java.lang.Throwable> int forEach(IJavetBiIndexedConsumer<Key,Value,E> consumer) throws JavetException, E extends java.lang.Throwable
IV8ValueObject
forEach
in interface IV8ValueObject
Key
- the type of keyValue
- the type of valueE
- the type of exceptionconsumer
- the consumerJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Throwable
public <T extends V8Value> T get(java.lang.Object key) throws JavetException
IV8ValueObject
The return value must be consumed, otherwise memory leak may occur.
get
in interface IV8ValueObject
get
in class V8ValueObject
T
- the type parameterkey
- the property keyJavetException
- the javet exceptionpublic java.lang.Boolean getBoolean(java.lang.Object key) throws JavetException
IV8ValueObject
getBoolean
in interface IV8ValueObject
getBoolean
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic java.lang.Double getDouble(java.lang.Object key) throws JavetException
IV8ValueObject
getDouble
in interface IV8ValueObject
getDouble
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic java.lang.Integer getInteger(java.lang.Object key) throws JavetException
IV8ValueObject
getInteger
in interface IV8ValueObject
getInteger
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic java.lang.Long getLong(java.lang.Object key) throws JavetException
IV8ValueObject
getLong
in interface IV8ValueObject
getLong
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic int getSize() throws JavetException
getSize
in interface IV8ValueKeyContainer
JavetException
public java.lang.String getString(java.lang.Object key) throws JavetException
IV8ValueObject
getString
in interface IV8ValueObject
getString
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic V8ValueReferenceType getType()
getType
in interface IV8ValueReference
getType
in class V8ValueObject
public boolean has(java.lang.Object value) throws JavetException
IV8ValueObject
has
in interface IV8ValueObject
has
in class V8ValueObject
value
- the valueJavetException
- the javet exceptionpublic boolean set(java.lang.Object key, java.lang.Object value) throws JavetException
IV8ValueObject
set
in interface IV8ValueObject
set
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean set(java.lang.Object... keysAndValues) throws JavetException
IV8ValueObject
set
in interface IV8ValueObject
set
in class V8ValueObject
keysAndValues
- the keys and valuesJavetException
- the javet exceptionpublic boolean setBoolean(java.lang.Object key, java.lang.Boolean value) throws JavetException
IV8ValueObject
setBoolean
in interface IV8ValueObject
setBoolean
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean setDouble(java.lang.Object key, java.lang.Double value) throws JavetException
IV8ValueObject
setDouble
in interface IV8ValueObject
setDouble
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean setInteger(java.lang.Object key, java.lang.Integer value) throws JavetException
IV8ValueObject
setInteger
in interface IV8ValueObject
setInteger
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean setLong(java.lang.Object key, java.lang.Long value) throws JavetException
IV8ValueObject
setLong
in interface IV8ValueObject
setLong
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean setNull(java.lang.Object key) throws JavetException
IV8ValueObject
setNull
in interface IV8ValueObject
setNull
in class V8ValueObject
key
- the keyJavetException
- the javet exceptionpublic boolean setString(java.lang.Object key, java.lang.String value) throws JavetException
IV8ValueObject
setString
in interface IV8ValueObject
setString
in class V8ValueObject
key
- the keyvalue
- the valueJavetException
- the javet exceptionpublic boolean setUndefined(java.lang.Object key) throws JavetException
IV8ValueObject
setUndefined
in interface IV8ValueObject
setUndefined
in class V8ValueObject
key
- the keyJavetException
- the javet exception