|
Follow us on GitHub |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.google.gwt.maps.client.mvc.MVCObject<T>
com.google.gwt.maps.client.mvc.MVCArray<T>
public class MVCArray<T extends JavaScriptObject>
This class extends MVCObject.
See MVCArray API Doc
Constructor Summary | |
---|---|
protected |
MVCArray()
This class extends MVCObject. |
Method Summary | ||
---|---|---|
HandlerRegistration |
addInsertAtHandler(InsertAtMapHandler handler)
This event is fired when insertAt() is called. |
|
HandlerRegistration |
addRemoveAtHandler(RemoveAtMapHandler handler)
This event is fired when removeAt() is called. |
|
HandlerRegistration |
addSetAtHandler(SetAtMapHandler handler)
This event is fired when setAt() is called. |
|
void |
clear()
Removes all elements from the array. |
|
void |
forEach(MVCArrayCallback<T> callback)
Iterate over each element, calling the provided callback. |
|
T |
get(int index)
Get an element at the specified index. |
|
JsArray<T> |
getArray()
Returns a reference to the underlying Array. |
|
int |
getLength()
Returns the number of elements in this array. |
|
void |
insertAt(int index,
T element)
Inserts an element at the specified index. |
|
static
|
newInstance()
A mutable MVC Array. |
|
static
|
newInstance(JsArray<T> array)
A mutable MVC Array. |
|
static
|
newInstance(T... array)
A mutable MVC Array. |
|
T |
pop()
Removes the last element of the array and returns that element. |
|
int |
push(T element)
Adds one element to the end of the array and returns the new length of the array. |
|
T |
removeAt(int index)
Removes an element from the specified index. |
|
void |
setAt(int index,
T element)
Sets an element at the specified index. |
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObject |
---|
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MVCArray()
Method Detail |
---|
public static final <T extends JavaScriptObject> MVCArray<T> newInstance()
public static final <T extends JavaScriptObject> MVCArray<T> newInstance(JsArray<T> array)
array
- public static final <T extends JavaScriptObject> MVCArray<T> newInstance(T... array)
array
- one ore more objects (like T[] or T)public final void clear()
public final void forEach(MVCArrayCallback<T> callback)
callback
- public final JsArray<T> getArray()
public final T get(int index)
index
- public final int getLength()
public final void insertAt(int index, T element)
index
- element
- public final T pop()
public final int push(T element)
element
-
public final T removeAt(int index)
index
- public final void setAt(int index, T element)
index
- element
- public final HandlerRegistration addInsertAtHandler(InsertAtMapHandler handler)
handler
- public final HandlerRegistration addRemoveAtHandler(RemoveAtMapHandler handler)
handler
- public final HandlerRegistration addSetAtHandler(SetAtMapHandler handler)
handler
-
|
Follow us on GitHub |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |