Package jp.vmi.script
Class JSMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
jp.vmi.script.JSMap<K,V>
- Type Parameters:
K- the type of key.V- the type of value.
- All Implemented Interfaces:
Map<K,V>
public class JSMap<K,V> extends AbstractMap<K,V>
Wrapper for JavaScript map.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceJSMap.EntrySetCallback<K,V>Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object> -
Constructor Summary
Constructors Constructor Description JSMap(ScriptEngine engine, Object object)Constructor. -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
JSMap
Constructor.- Parameters:
engine- script engine.object- JavaScript object.
-
-
Method Details
-
get
-
entrySet
-
unwrap
Unwrap object.- Returns:
- unwrapped object.
-
toMap
JavaScript object to Map.- Type Parameters:
K- the type of key.V- the type of value.- Parameters:
engine- Script engine.object- JavaScript object.- Returns:
- Map object.
-