Class NativeMap

    • Constructor Detail

      • NativeMap

        public NativeMap()
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Description copied from class: ScriptableObject
        Return the name of the class.

        This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.

        Specified by:
        getClassName in interface Scriptable
        Specified by:
        getClassName in class ScriptableObject
      • js_set

        private java.lang.Object js_set​(java.lang.Object k,
                                        java.lang.Object v)
      • js_delete

        private java.lang.Object js_delete​(java.lang.Object arg)
      • js_get

        private java.lang.Object js_get​(java.lang.Object arg)
      • js_has

        private java.lang.Object js_has​(java.lang.Object arg)
      • js_getSize

        private java.lang.Object js_getSize()
      • js_clear

        private java.lang.Object js_clear()
      • js_forEach

        private java.lang.Object js_forEach​(Context cx,
                                            Scriptable scope,
                                            java.lang.Object arg1,
                                            java.lang.Object arg2)
      • loadFromIterable

        static void loadFromIterable​(Context cx,
                                     Scriptable scope,
                                     ScriptableObject map,
                                     java.lang.Object arg1)
        If an "iterable" object was passed to the constructor, there are many many things to do... Make this static because NativeWeakMap has the exact same requirement.
      • key

        static java.lang.Object key​(java.lang.Object[] args)
        Extracts the key from the first args entry if any and takes care of the Delegator. This is used by NativeSet, NativeWeakMap, and NativeWekSet also.
        Parameters:
        args - the args
        Returns:
        the first argument (de-delegated) or undefined if there is no element in args