E - The type stored in the array elementspublic class Array<E>
extends com.google.gwt.core.client.JavaScriptObject
| Modifier | Constructor and Description |
|---|---|
protected |
Array() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E elem) |
void |
clear() |
Array<E> |
clone()
Clone the current array
|
E |
get(int index) |
int |
indexOf(E elem) |
void |
insert(int index,
E elem)
Inserts
elem before the element residing at index. |
void |
remove(E elem)
Removes the element.
|
void |
remove(int index)
Removes the element at the specified index.
|
void |
remove(int index,
int count)
Removes count elements starting at the specified index.
|
void |
set(int index,
E elem)
Replaces the element at the specified index.
|
void |
setSize(int newSize,
E fillValue)
Changes the array size.
|
int |
size()
Retrieve the array size
|
void |
sort(Comparator<E> comparator) |
public final void add(E elem)
public final void clear()
public final E get(int index)
public final int indexOf(E elem)
elem - public final void insert(int index,
E elem)
elem before the element residing at index.index - in the range [0, this.size()], inclusive; if index is equal to
the array's current size, the result is equivalent to calling
add(Object)elem - the element to insert or nullpublic final void remove(E elem)
public final void remove(int index)
index - position to be removedpublic final void remove(int index,
int count)
index - the first element to be removedcount - number of elements to be removedpublic final void set(int index,
E elem)
index - in the range [0, this.size()), exclusiveelem - the element to insert or nullpublic final void setSize(int newSize,
E fillValue)
newSize is less than the current size,
the array is truncated. If newSize is greater than the current
size the array is grown and the new elements of the array filled up with
fillValue.public final int size()
public final void sort(Comparator<E> comparator)
Copyright © 2015. All rights reserved.