Class NativeInt16Array
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.typedarrays.NativeArrayBufferView
org.mozilla.javascript.typedarrays.NativeTypedArrayView<Short>
org.mozilla.javascript.typedarrays.NativeInt16Array
- All Implemented Interfaces:
Serializable
,Iterable<Short>
,Collection<Short>
,List<Short>
,RandomAccess
,SequencedCollection<Short>
,ConstProperties
,DebuggableObject
,ExternalArrayData
,IdFunctionCall
,Scriptable
,SymbolScriptable
An array view that stores 16-bit quantities and implements the JavaScript "Int16Array" interface.
It also implements List<Short> for direct manipulation in Java.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final String
private static final long
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
ConstructorsConstructorDescriptionNativeInt16Array
(int len) NativeInt16Array
(NativeArrayBuffer ab, int off, int len) -
Method Summary
Modifier and TypeMethodDescriptionprotected NativeInt16Array
construct
(NativeArrayBuffer ab, int off, int len) get
(int i) int
Return the number of bytes represented by each element in the array.Return the name of the class.static void
init
(Context cx, Scriptable scope, boolean sealed) protected Object
js_get
(int index) protected Object
protected NativeInt16Array
realThis
(Scriptable thisObj, IdFunctionObject f) 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, useLittleEndian
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, findInstanceIdInfo, get, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, 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, defineProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, 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.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
CLASS_NAME
- See Also:
-
BYTES_PER_ELEMENT
private static final int BYTES_PER_ELEMENT- See Also:
-
-
Constructor Details
-
NativeInt16Array
public NativeInt16Array() -
NativeInt16Array
-
NativeInt16Array
public NativeInt16Array(int len)
-
-
Method Details
-
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 interfaceScriptable
- Specified by:
getClassName
in classScriptableObject
-
init
-
construct
- Specified by:
construct
in classNativeTypedArrayView<Short>
-
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 classNativeTypedArrayView<Short>
-
realThis
- Specified by:
realThis
in classNativeTypedArrayView<Short>
-
js_get
- Specified by:
js_get
in classNativeTypedArrayView<Short>
-
js_set
- Specified by:
js_set
in classNativeTypedArrayView<Short>
-
get
-
set
-