public abstract class NativeTypedArrayView<T> extends NativeArrayBufferView implements java.util.List<T>, java.util.RandomAccess, ExternalArrayData
ScriptableObject.KeyComparator| Modifier and Type | Field and Description |
|---|---|
protected int |
length
The length, in elements, of the array
|
protected static int |
MAX_PROTOTYPE_ID |
arrayBuffer, byteLength, offsetCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Modifier | Constructor and Description |
|---|---|
protected |
NativeTypedArrayView() |
protected |
NativeTypedArrayView(NativeArrayBuffer ab,
int off,
int len,
int byteLen) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int i,
T aByte) |
boolean |
add(T aByte) |
boolean |
addAll(java.util.Collection<? extends T> bytes) |
boolean |
addAll(int i,
java.util.Collection<? extends T> bytes) |
protected boolean |
checkIndex(int index) |
void |
clear() |
protected abstract NativeTypedArrayView<T> |
construct(NativeArrayBuffer ab,
int off,
int len) |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> objects) |
void |
delete(int index)
Removes the indexed property from the object.
|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
execIdCall(IdFunctionObject f,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable
should be returned.
|
protected void |
fillConstructorProperties(IdFunctionObject ctor) |
protected int |
findInstanceIdInfo(java.lang.String s)
Map name to id of instance property.
|
protected int |
findPrototypeId(java.lang.String s) |
protected int |
findPrototypeId(Symbol k) |
java.lang.Object |
get(int index,
Scriptable start)
Returns the value of the indexed property or NOT_FOUND.
|
java.lang.Object |
getArrayElement(int index)
Return the element at the specified index.
|
int |
getArrayLength()
Return the length of the array.
|
abstract int |
getBytesPerElement()
Return the number of bytes represented by each element in the array.
|
java.lang.Object[] |
getIds()
Returns an array of ids for the properties of the object.
|
protected java.lang.String |
getInstanceIdName(int id)
Map id back to property name it defines.
|
protected java.lang.Object |
getInstanceIdValue(int id)
Get id value.
|
protected int |
getMaxInstanceId()
Get maximum id findInstanceIdInfo can generate.
|
boolean |
has(int index,
Scriptable start)
Returns true if the property index is defined.
|
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
protected void |
initPrototypeId(int id) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
protected abstract java.lang.Object |
js_get(int index) |
protected abstract java.lang.Object |
js_set(int index,
java.lang.Object c) |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<T> |
listIterator() |
java.util.ListIterator<T> |
listIterator(int start) |
void |
put(int index,
Scriptable start,
java.lang.Object val)
Sets the value of the indexed property, creating it if need be.
|
protected abstract NativeTypedArrayView<T> |
realThis(Scriptable thisObj,
IdFunctionObject f) |
T |
remove(int i) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> objects) |
boolean |
retainAll(java.util.Collection<?> objects) |
void |
setArrayElement(int index,
java.lang.Object value)
Set the element at the specified index.
|
int |
size() |
java.util.List<T> |
subList(int i,
int i2) |
java.lang.Object[] |
toArray() |
<U> U[] |
toArray(U[] ts) |
getBuffer, getByteLength, getByteOffset, isArg, useLittleEndianactivatePrototypeMap, 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, setInstanceIdValueapplyDescriptorToAttributeBitset, 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, getClassName, 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, setPrototypeprotected final int length
protected static final int MAX_PROTOTYPE_ID
protected NativeTypedArrayView()
protected NativeTypedArrayView(NativeArrayBuffer ab, int off, int len, int byteLen)
public java.lang.Object get(int index,
Scriptable start)
ScriptableObjectget in interface Scriptableget in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup beganScriptable.get(String,Scriptable)public boolean has(int index,
Scriptable start)
ScriptableObjecthas in interface Scriptablehas in class ScriptableObjectindex - the numeric index for the propertystart - the object in which the lookup beganScriptable.get(int, Scriptable),
ScriptableObject.getProperty(Scriptable, int)public void put(int index,
Scriptable start,
java.lang.Object val)
ScriptableObjectput in interface Scriptableput in class ScriptableObjectindex - the numeric index for the propertystart - the object whose property is being setval - value to set the property toScriptable.has(int, Scriptable),
Scriptable.get(int, Scriptable),
ScriptableObject.putProperty(Scriptable, int, Object),
Context.toObject(Object, Scriptable)public void delete(int index)
ScriptableObjectIf the property is not found, or it has the PERMANENT attribute, no action is taken.
delete in interface Scriptabledelete in class ScriptableObjectindex - the numeric index for the propertyScriptable.get(int, Scriptable),
ScriptableObject.deleteProperty(Scriptable, int)public java.lang.Object[] getIds()
ScriptableObjectAny properties with the attribute DONTENUM are not listed.
getIds in interface ScriptablegetIds in class ScriptableObjectprotected boolean checkIndex(int index)
public abstract int getBytesPerElement()
protected abstract NativeTypedArrayView<T> construct(NativeArrayBuffer ab, int off, int len)
protected abstract java.lang.Object js_get(int index)
protected abstract java.lang.Object js_set(int index,
java.lang.Object c)
protected abstract NativeTypedArrayView<T> realThis(Scriptable thisObj, IdFunctionObject f)
public java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
IdScriptableObjectexecIdCall in interface IdFunctionCallexecIdCall in class IdScriptableObjectprotected void initPrototypeId(int id)
initPrototypeId in class IdScriptableObjectprotected int findPrototypeId(Symbol k)
findPrototypeId in class IdScriptableObjectprotected int findPrototypeId(java.lang.String s)
findPrototypeId in class IdScriptableObjectprotected void fillConstructorProperties(IdFunctionObject ctor)
fillConstructorProperties in class IdScriptableObjectprotected int getMaxInstanceId()
IdScriptableObjectgetMaxInstanceId in class NativeArrayBufferViewprotected java.lang.String getInstanceIdName(int id)
IdScriptableObjectgetInstanceIdName in class NativeArrayBufferViewprotected java.lang.Object getInstanceIdValue(int id)
IdScriptableObjectgetInstanceIdValue in class NativeArrayBufferViewprotected int findInstanceIdInfo(java.lang.String s)
IdScriptableObjectIdScriptableObject.instanceIdInfo(int, int).findInstanceIdInfo in class NativeArrayBufferViewpublic java.lang.Object getArrayElement(int index)
ExternalArrayDatagetArrayElement in interface ExternalArrayDatapublic void setArrayElement(int index,
java.lang.Object value)
ExternalArrayDatasetArrayElement in interface ExternalArrayDatapublic int getArrayLength()
ExternalArrayDatagetArrayLength in interface ExternalArrayDatapublic boolean containsAll(java.util.Collection<?> objects)
public int indexOf(java.lang.Object o)
indexOf in interface java.util.List<T>public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<T>public java.lang.Object[] toArray()
public <U> U[] toArray(U[] ts)
public int size()
size in interface java.util.Collection<T>size in interface java.util.List<T>size in class ScriptableObjectpublic boolean isEmpty()
isEmpty in interface java.util.Collection<T>isEmpty in interface java.util.List<T>isEmpty in class ScriptableObjectpublic boolean contains(java.lang.Object o)
public boolean equals(java.lang.Object o)
public int hashCode()
public java.util.Iterator<T> iterator()
public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>public java.util.ListIterator<T> listIterator(int start)
listIterator in interface java.util.List<T>public java.util.List<T> subList(int i, int i2)
subList in interface java.util.List<T>public boolean add(T aByte)
public boolean addAll(java.util.Collection<? extends T> bytes)
public boolean addAll(int i,
java.util.Collection<? extends T> bytes)
addAll in interface java.util.List<T>public void clear()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> objects)