public abstract class JSBaseArray<T> extends JSFunction implements java.util.List<T>
JSObject.jsexport, JSObject.Property<T>
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T val)
Adds a JSValue to the end of an array.
|
boolean |
addAll(java.util.Collection<? extends T> collection) |
boolean |
addAll(int index,
java.util.Collection<? extends T> collection) |
void |
clear() |
boolean |
contains(java.lang.Object object) |
boolean |
containsAll(java.util.Collection<?> collection) |
boolean |
equals(java.lang.Object other) |
T |
get(int index)
Gets JSValue at 'index'
|
int |
hashCode() |
int |
indexOf(java.lang.Object object) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
int |
lastIndexOf(java.lang.Object object) |
java.util.ListIterator<T> |
listIterator() |
java.util.ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> collection) |
boolean |
retainAll(java.util.Collection<?> collection) |
T |
set(int index,
T element) |
int |
size() |
java.lang.Object[] |
toArray()
Extracts Java JSValue array from JavaScript array
|
java.lang.Object[] |
toArray(java.lang.Class clazz)
Converts to a static array with elements of class 'clazz'
|
<U> U[] |
toArray(U[] elemArray) |
apply, call, call, newInstance
__nullFunc, deleteProperty, getThis, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
getContext, isArray, isBoolean, isDate, isEqual, isFloat32Array, isFloat64Array, isInstanceOfConstructor, isInt16Array, isInt32Array, isInt8Array, isNull, isNumber, isObject, isStrictEqual, isString, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toNumber, toObject, toString, valueHash, valueRef
public java.lang.Object[] toArray(java.lang.Class clazz)
clazz
- The class to convert the elements to (Integer.class, Double.class,
String.class, JSValue.class, etc.)@NonNull public java.lang.Object[] toArray()
public T get(int index)
get
in interface java.util.List<T>
index
- Index of the element to getList.get(int)
public boolean add(T val)
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object object)
@NonNull public java.util.Iterator<T> iterator()
@NonNull public <U> U[] toArray(@NonNull U[] elemArray)
public boolean remove(java.lang.Object object)
public boolean containsAll(@NonNull java.util.Collection<?> collection)
public boolean addAll(@NonNull java.util.Collection<? extends T> collection)
public boolean addAll(int index, @NonNull java.util.Collection<? extends T> collection)
addAll
in interface java.util.List<T>
List.addAll(int, Collection)
public boolean removeAll(@NonNull java.util.Collection<?> collection)
public boolean retainAll(@NonNull java.util.Collection<?> collection)
public void clear()
public T set(int index, T element)
set
in interface java.util.List<T>
List.set(int, Object)
public void add(int index, T element)
add
in interface java.util.List<T>
List.add(int, Object)
public T remove(int index)
remove
in interface java.util.List<T>
List.remove(int)
public int indexOf(java.lang.Object object)
indexOf
in interface java.util.List<T>
List.indexOf(Object)
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List<T>
List.lastIndexOf(Object)
@NonNull public java.util.ListIterator<T> listIterator()
listIterator
in interface java.util.List<T>
List.listIterator()
@NonNull public java.util.ListIterator<T> listIterator(int index)
listIterator
in interface java.util.List<T>
List.listIterator(int)
public boolean equals(java.lang.Object other)