ExternalArrayData (rhino 1.7.14 API)

org.mozilla.javascript

## Interface ExternalArrayData

- All Known Implementing Classes:
    NativeFloat32Array, NativeFloat64Array, NativeInt16Array, NativeInt32Array, NativeInt8Array, NativeTypedArrayView, NativeUint16Array, NativeUint32Array, NativeUint8Array, NativeUint8ClampedArray

      public interface ExternalArrayData

  Implement this interface in order to allow external data to be attached to a ScriptableObject.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getArrayElement(int index)` Return the element at the specified index.
    `int` | `getArrayLength()` Return the length of the array.
    `void` | `setArrayElement(int index, java.lang.Object value)` Set the element at the specified index.

- - ### Method Detail

    - #### getArrayElement

          java.lang.Object getArrayElement(int index)

      Return the element at the specified index. The result must be a type that is valid in JavaScript: Number, String, or Scriptable. This method will not be called unless "index" is in range.

    - #### setArrayElement

          void setArrayElement(int index,
                               java.lang.Object value)

      Set the element at the specified index. This method will not be called unless "index" is in range. The method must check that "value" is a valid type, and convert it if necessary.

    - #### getArrayLength

          int getArrayLength()

      Return the length of the array.