Top Inners Fields Constructors Methods
org.graalvm.polyglot.proxy

pack-priv final Class ProxyHashMapImpl

Located in compilation unit of org.graalvm.polyglot.proxy.ProxyHashMap.

extends Object
implements ProxyHashMap
Class Inheritance
All Implemented Interfaces
org.graalvm.polyglot.proxy.ProxyHashMap, org.graalvm.polyglot.proxy.Proxy

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final Map<Object, Object>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
public long
getHashSize()

Implements org.graalvm.polyglot.proxy.ProxyHashMap.getHashSize.

Returns the number of map entries.

public Object
getHashValue(Value key)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.getHashValue.

Returns the value for the specified key.

public boolean
hasHashEntry(Value key)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.hasHashEntry.

Returns true if the proxy object contains a mapping for the specified key, or else false.

public void
putHashEntry(Value key, Value value)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.putHashEntry.

Associates the specified value with the specified key.

public boolean
removeHashEntry(Value key)

Overrides default org.graalvm.polyglot.proxy.ProxyHashMap.removeHashEntry.

Removes the mapping for a given key.

private static Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valuesback to summary
private final Map<Object, Object> values

Constructor Detail

ProxyHashMapImplback to summary
pack-priv ProxyHashMapImpl(Map<Object, Object> values)

Method Detail

getHashEntriesIteratorback to summary
public Object getHashEntriesIterator()

Implements org.graalvm.polyglot.proxy.ProxyHashMap.getHashEntriesIterator.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.getHashEntriesIterator.

Returns the hash entries iterator. The returned object must be interpreted as an iterator using the semantics of Context#asValue(Object) otherwise an IllegalStateException is thrown. The iterator elements must be interpreted as two elements array using the semantics of Context#asValue(Object).

Examples for valid return values are:

Examples for valid iterator elements are:

Annotations
@Override
getHashSizeback to summary
public long getHashSize()

Implements org.graalvm.polyglot.proxy.ProxyHashMap.getHashSize.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.getHashSize.

Returns the number of map entries.

Annotations
@Override
getHashValueback to summary
public Object getHashValue(Value key)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.getHashValue.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.getHashValue.

Returns the value for the specified key.

Annotations
@Override
hasHashEntryback to summary
public boolean hasHashEntry(Value key)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.hasHashEntry.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.hasHashEntry.

Returns true if the proxy object contains a mapping for the specified key, or else false. Every key which returns true for hasHashEntry(Value) must be included in the iterator returned by getHashEntriesIterator() to allow guest language to enumerate map entries.

Annotations
@Override
putHashEntryback to summary
public void putHashEntry(Value key, Value value)

Implements org.graalvm.polyglot.proxy.ProxyHashMap.putHashEntry.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.putHashEntry.

Associates the specified value with the specified key. If the mapping for the specified key does not exist then a new mapping is defined otherwise, an existing mapping is updated.

Annotations
@Override
removeHashEntryback to summary
public boolean removeHashEntry(Value key)

Overrides default org.graalvm.polyglot.proxy.ProxyHashMap.removeHashEntry.

Doc from org.graalvm.polyglot.proxy.ProxyHashMap.removeHashEntry.

Removes the mapping for a given key. If the removal of existing mappings is not supported then an UnsupportedOperationException is thrown.

Returns:boolean

true when the mapping was removed, false when the mapping didn't exist.

Annotations
@Override
unboxKeyback to summary
private static Object unboxKey(Value key)
org.graalvm.polyglot.proxy back to summary

private Class ProxyHashMapImpl.ProxyEntryImpl

extends Object
implements ProxyArray
Class Inheritance
All Implemented Interfaces
org.graalvm.polyglot.proxy.ProxyArray, org.graalvm.polyglot.proxy.ProxyIterable, org.graalvm.polyglot.proxy.Proxy

Field Summary

Modifier and TypeField and Description
private Map.Entry<Object, Object>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
get(long index)

Implements org.graalvm.polyglot.proxy.ProxyArray.get.

Returns the element at the given index.

public long
getSize()

Implements org.graalvm.polyglot.proxy.ProxyArray.getSize.

Returns the reported size of the array.

public void
set(long index, Value value)

Implements org.graalvm.polyglot.proxy.ProxyArray.set.

Sets the element at the given index.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapEntryback to summary
private Map.Entry<Object, Object> mapEntry

Constructor Detail

ProxyEntryImplback to summary
pack-priv ProxyEntryImpl(Map.Entry<Object, Object> mapEntry)

Method Detail

getback to summary
public Object get(long index)

Implements org.graalvm.polyglot.proxy.ProxyArray.get.

Doc from org.graalvm.polyglot.proxy.ProxyArray.get.

Returns the element at the given index.

Annotations
@Override
getSizeback to summary
public long getSize()

Implements org.graalvm.polyglot.proxy.ProxyArray.getSize.

Doc from org.graalvm.polyglot.proxy.ProxyArray.getSize.

Returns the reported size of the array. The returned size of an array does not limit a guest language to get and set values using arbitrary indices. The array size is typically used by Graal languages to traverse the array.

Annotations
@Override
setback to summary
public void set(long index, Value value)

Implements org.graalvm.polyglot.proxy.ProxyArray.set.

Doc from org.graalvm.polyglot.proxy.ProxyArray.set.

Sets the element at the given index.

Annotations
@Override