Package jp.vmi.script

Class 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.
    • Constructor Detail

      • JSMap

        public JSMap​(ScriptEngine engine,
                     Object object)
        Constructor.
        Parameters:
        engine - script engine.
        object - JavaScript object.
    • Method Detail

      • unwrap

        public Object unwrap()
        Unwrap object.
        Returns:
        unwrapped object.
      • toMap

        public static <K,​V> Map<K,​V> toMap​(ScriptEngine engine,
                                                       Object object)
        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.