Package org.mozilla.javascript

## Class ObjArray

- java.lang.Object
- - org.mozilla.javascript.ObjArray

- All Implemented Interfaces:
    `java.io.Serializable`

      public class ObjArray
      extends java.lang.Object
      implements java.io.Serializable

  Implementation of resizable array with focus on minimizing memory usage by storing few initial array elements in object fields. Can also be used as a stack.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ObjArray()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(int index, java.lang.Object value)` |
    `void` | `add​(java.lang.Object value)` |
    `void` | `clear()` |
    `java.lang.Object` | `get​(int index)` |
    `int` | `indexOf​(java.lang.Object obj)` |
    `boolean` | `isEmpty()` |
    `boolean` | `isSealed()` |
    `int` | `lastIndexOf​(java.lang.Object obj)` |
    `java.lang.Object` | `peek()` |
    `java.lang.Object` | `pop()` |
    `void` | `push​(java.lang.Object value)` |
    `void` | `remove​(int index)` |
    `void` | `seal()` |
    `void` | `set​(int index, java.lang.Object value)` |
    `void` | `setSize​(int newSize)` |
    `int` | `size()` |
    `java.lang.Object[]` | `toArray()` |
    `void` | `toArray​(java.lang.Object[] array)` |
    `void` | `toArray​(java.lang.Object[] array, int offset)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ObjArray

          public ObjArray()

  - ### Method Detail

    - #### isSealed

          public final boolean isSealed()

    - #### seal

          public final void seal()

    - #### isEmpty

          public final boolean isEmpty()

    - #### size

          public final int size()

    - #### setSize

          public final void setSize​(int newSize)

    - #### get

          public final java.lang.Object get​(int index)

    - #### set

          public final void set​(int index,
                                java.lang.Object value)

    - #### indexOf

          public int indexOf​(java.lang.Object obj)

    - #### lastIndexOf

          public int lastIndexOf​(java.lang.Object obj)

    - #### peek

          public final java.lang.Object peek()

    - #### pop

          public final java.lang.Object pop()

    - #### push

          public final void push​(java.lang.Object value)

    - #### add

          public final void add​(java.lang.Object value)

    - #### add

          public final void add​(int index,
                                java.lang.Object value)

    - #### remove

          public final void remove​(int index)

    - #### clear

          public final void clear()

    - #### toArray

          public final java.lang.Object[] toArray()

    - #### toArray

          public final void toArray​(java.lang.Object[] array)

    - #### toArray

          public final void toArray​(java.lang.Object[] array,
                                    int offset)