Class NativeArray

    • Constructor Detail

      • NativeArray

        public NativeArray​(long lengthArg)
      • NativeArray

        public NativeArray​(java.lang.Object[] array)
    • 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
      • get

        public java.lang.Object get​(int index,
                                    Scriptable start)
        Description copied from class: ScriptableObject
        Returns the value of the indexed property or NOT_FOUND.
        Specified by:
        get in interface Scriptable
        Overrides:
        get in class ScriptableObject
        Parameters:
        index - the numeric index for the property
        start - the object in which the lookup began
        Returns:
        the value of the property (may be null), or NOT_FOUND
        See Also:
        Scriptable.get(String,Scriptable)
      • getIds

        public java.lang.Object[] getIds()
        Description copied from class: ScriptableObject
        Returns an array of ids for the properties of the object.

        Any properties with the attribute DONTENUM are not listed.

        Specified by:
        getIds in interface Scriptable
        Overrides:
        getIds in class ScriptableObject
        Returns:
        an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.
      • getAllIds

        public java.lang.Object[] getAllIds()
        Description copied from class: ScriptableObject
        Returns an array of ids for the properties of the object.

        All properties, even those with attribute DONTENUM, are listed.

        Specified by:
        getAllIds in interface DebuggableObject
        Overrides:
        getAllIds in class ScriptableObject
        Returns:
        an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.
      • getIndexIds

        public java.lang.Integer[] getIndexIds()
      • getDefaultValue

        public java.lang.Object getDefaultValue​(java.lang.Class<?> hint)
        Description copied from class: ScriptableObject
        Implements the [[DefaultValue]] internal method.

        Note that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.

        A hint of null means "no hint".

        Specified by:
        getDefaultValue in interface Scriptable
        Overrides:
        getDefaultValue in class ScriptableObject
        Parameters:
        hint - the type hint
        Returns:
        the default value for the object See ECMA 8.6.2.6.
      • getLength

        public long getLength()
      • jsGet_length

        @Deprecated
        public long jsGet_length()
        Deprecated.
        Use getLength() instead.
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection
        Specified by:
        contains in interface java.util.List
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
      • toArray

        public java.lang.Object[] toArray​(java.lang.Object[] a)
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
      • containsAll

        public boolean containsAll​(java.util.Collection c)
        Specified by:
        containsAll in interface java.util.Collection
        Specified by:
        containsAll in interface java.util.List
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.List
        Overrides:
        size in class ScriptableObject
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection
        Specified by:
        isEmpty in interface java.util.List
        Overrides:
        isEmpty in class ScriptableObject
      • get

        public java.lang.Object get​(long index)
      • get

        public java.lang.Object get​(int index)
        Specified by:
        get in interface java.util.List
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List
      • iterator

        public java.util.Iterator iterator()
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.List
      • listIterator

        public java.util.ListIterator listIterator()
        Specified by:
        listIterator in interface java.util.List
      • listIterator

        public java.util.ListIterator listIterator​(int start)
        Specified by:
        listIterator in interface java.util.List
      • add

        public boolean add​(java.lang.Object o)
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.List
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection
        Specified by:
        remove in interface java.util.List
      • addAll

        public boolean addAll​(java.util.Collection c)
        Specified by:
        addAll in interface java.util.Collection
        Specified by:
        addAll in interface java.util.List
      • removeAll

        public boolean removeAll​(java.util.Collection c)
        Specified by:
        removeAll in interface java.util.Collection
        Specified by:
        removeAll in interface java.util.List
      • retainAll

        public boolean retainAll​(java.util.Collection c)
        Specified by:
        retainAll in interface java.util.Collection
        Specified by:
        retainAll in interface java.util.List
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection
        Specified by:
        clear in interface java.util.List
      • add

        public void add​(int index,
                        java.lang.Object element)
        Specified by:
        add in interface java.util.List
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection c)
        Specified by:
        addAll in interface java.util.List
      • set

        public java.lang.Object set​(int index,
                                    java.lang.Object element)
        Specified by:
        set in interface java.util.List
      • remove

        public java.lang.Object remove​(int index)
        Specified by:
        remove in interface java.util.List
      • subList

        public java.util.List subList​(int fromIndex,
                                      int toIndex)
        Specified by:
        subList in interface java.util.List