public abstract class JSBaseArray<T> extends JSFunction implements java.util.List<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, prototype, prototype
__nullFunc, callAsFunction, callAsFunction, callAsFunction, callAsFunction, deleteProperty, getThis, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames
getContext, isArray, isBoolean, isDate, isEqual, isInstanceOfConstructor, isNull, isNumber, isObject, isStrictEqual, isString, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toJSON, toNumber, toObject, toString, valueRef
public java.lang.Object[] toArray(java.lang.Class clazz) throws JSException
clazz
- The class to convert the elements to (Integer.class, Double.class,
String.class, JSValue.class, etc.)JSException
@NonNull public java.lang.Object[] toArray() throws JSException
toArray
in interface java.util.Collection<T>
toArray
in interface java.util.List<T>
JSException
List.toArray()
public T get(int index)
get
in interface java.util.List<T>
index
- Index of the element to getJSException
List.get(int)
public boolean add(T val) throws JSException
add
in interface java.util.Collection<T>
add
in interface java.util.List<T>
val
- The Java object to add to the array, will get converted to a JSValueJSException
List.add(Object)
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)
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)