org.mozilla.javascript.typedarrays

## Class NativeUint8ClampedArray

- java.lang.Object
- - org.mozilla.javascript.ScriptableObject
  - - org.mozilla.javascript.IdScriptableObject
    - - org.mozilla.javascript.typedarrays.NativeArrayBufferView
      - - org.mozilla.javascript.typedarrays.NativeTypedArrayView<java.lang.Integer>
        - - org.mozilla.javascript.typedarrays.NativeUint8ClampedArray

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.List<java.lang.Integer>, java.util.RandomAccess, ConstProperties, DebuggableObject, ExternalArrayData, IdFunctionCall, Scriptable, SymbolScriptable

      public class NativeUint8ClampedArray
      extends NativeTypedArrayView<java.lang.Integer>

  An array view that stores 8-bit quantities and implements the JavaScript "Uint8ClampedArray" interface. It also implements List for direct manipulation in Java. Bytes inserted that fall out of the range (0 <= X < 256) will be adjusted so that they match before insertion.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

      `ScriptableObject.KeyComparator`

  - ### Field Summary

    - ### Fields inherited from class org.mozilla.javascript.typedarrays.NativeTypedArrayView

      `length, MAX_PROTOTYPE_ID`

    - ### Fields inherited from class org.mozilla.javascript.typedarrays.NativeArrayBufferView

      `arrayBuffer, byteLength, offset`

    - ### Fields inherited from class org.mozilla.javascript.ScriptableObject

      `CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST`

    - ### Fields inherited from interface org.mozilla.javascript.Scriptable

      `NOT_FOUND`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NativeUint8ClampedArray()`
    `NativeUint8ClampedArray(int len)`
    `NativeUint8ClampedArray(NativeArrayBuffer ab, int off, int len)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected NativeTypedArrayView` | `construct(NativeArrayBuffer ab, int off, int len)`
    `java.lang.Integer` | `get(int i)`
    `int` | `getBytesPerElement()` Return the number of bytes represented by each element in the array.
    `java.lang.String` | `getClassName()` Return the name of the class.
    `static void` | `init(Context cx, Scriptable scope, boolean sealed)`
    `protected java.lang.Object` | `js_get(int index)`
    `protected java.lang.Object` | `js_set(int index, java.lang.Object c)`
    `protected NativeTypedArrayView` | `realThis(Scriptable thisObj, IdFunctionObject f)`
    `java.lang.Integer` | `set(int i, java.lang.Integer aByte)`

    - ### Methods inherited from class org.mozilla.javascript.typedarrays.NativeTypedArrayView

      `add, add, addAll, addAll, checkIndex, clear, contains, containsAll, delete, equals, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, findPrototypeId, get, getArrayElement, getArrayLength, getIds, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, has, hashCode, indexOf, initPrototypeId, isEmpty, iterator, lastIndexOf, listIterator, listIterator, put, remove, remove, removeAll, retainAll, setArrayElement, size, subList, toArray, toArray`

    - ### Methods inherited from class org.mozilla.javascript.typedarrays.NativeArrayBufferView

      `getBuffer, getByteLength, getByteOffset, isArg`

    - ### Methods inherited from class org.mozilla.javascript.IdScriptableObject

      `activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, exportAsJSClass, findInstanceIdInfo, get, get, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValue`

    - ### Methods inherited from class org.mozilla.javascript.ScriptableObject

      `applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype`

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

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

    - ### Methods inherited from interface java.util.List

      `replaceAll, sort, spliterator`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Constructor Detail

    - #### NativeUint8ClampedArray

          public NativeUint8ClampedArray()

    - #### NativeUint8ClampedArray

          public NativeUint8ClampedArray(NativeArrayBuffer ab,
                                         int off,
                                         int len)

    - #### NativeUint8ClampedArray

          public NativeUint8ClampedArray(int len)

  - ### 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`

    - #### init

          public static void init(Context cx,
                                  Scriptable scope,
                                  boolean sealed)

    - #### construct

          protected NativeTypedArrayView construct(NativeArrayBuffer ab,
                                                   int off,
                                                   int len)

      Specified by:
        `construct` in class `NativeTypedArrayView<java.lang.Integer>`

    - #### getBytesPerElement

          public int getBytesPerElement()

      Description copied from class: `NativeTypedArrayView`
      Return the number of bytes represented by each element in the array. This can be useful when wishing to manipulate the byte array directly from Java.
      Specified by:
        `getBytesPerElement` in class `NativeTypedArrayView<java.lang.Integer>`

    - #### realThis

          protected NativeTypedArrayView realThis(Scriptable thisObj,
                                                  IdFunctionObject f)

      Specified by:
        `realThis` in class `NativeTypedArrayView<java.lang.Integer>`

    - #### js_get

          protected java.lang.Object js_get(int index)

      Specified by:
        `js_get` in class `NativeTypedArrayView<java.lang.Integer>`

    - #### js_set

          protected java.lang.Object js_set(int index,
                                            java.lang.Object c)

      Specified by:
        `js_set` in class `NativeTypedArrayView<java.lang.Integer>`

    - #### get

          public java.lang.Integer get(int i)

    - #### set

          public java.lang.Integer set(int i,
                                       java.lang.Integer aByte)