Class JreJsArray<T>
java.lang.Object
com.vaadin.client.flow.collection.JsArray<T>
com.vaadin.client.flow.collection.jre.JreJsArray<T>
- Type Parameters:
T- item type
Deprecated.
Only to be used for testing
JRE implementation of
JsArray, should only be used for testing.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorsConstructorDescriptionJreJsArray(T... values) Deprecated.Creates a new array with the given values. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T> Deprecated.Gets the values of this array as a list.voiddoClear()Deprecated.Internal method called to clear the array.doGet(int index) Deprecated.JRE implementation of the finalJsArray.get(int)method.voidDeprecated.JRE implementation of the finalJsArray.set(int, Object)method.doSpliceArray(int index, int remove, JsArray<? extends T> add) Deprecated.JRE implementation of the finalJsArray.spliceArray(int, int, JsArray)method.voidforEach(JsCollections.ForEachCallback<T> callback) Deprecated.Invokes the provided callback for each value in this array.intlength()Deprecated.Gets the current length of this array.intDeprecated.Adds items to the end of this array.shift()Deprecated.Removes and returns the first value from the array.Deprecated.Removes and adds a number of items at the given index.
-
Constructor Details
-
JreJsArray
Deprecated.Creates a new array with the given values.- Parameters:
values- the values of the new array
-
-
Method Details
-
doGet
Deprecated.JRE implementation of the finalJsArray.get(int)method.- Parameters:
index- the index- Returns:
- the value at the index
-
doSet
Deprecated.JRE implementation of the finalJsArray.set(int, Object)method.- Parameters:
index- the index to setvalue- the value to set
-
push
Deprecated.Description copied from class:JsArrayAdds items to the end of this array. -
length
public int length()Deprecated.Description copied from class:JsArrayGets the current length of this array. -
doSpliceArray
Deprecated.JRE implementation of the finalJsArray.spliceArray(int, int, JsArray)method.- Parameters:
index- the index at which to do the operationremove- the number of items to removeadd- new items to add- Returns:
- an array of removed items
-
splice
Deprecated.Description copied from class:JsArrayRemoves and adds a number of items at the given index. -
doClear
public void doClear()Deprecated.Internal method called to clear the array. -
asList
Deprecated.Gets the values of this array as a list. This method is only exposed to simplify testing.- Type Parameters:
T- the array type- Parameters:
array- the js array to get the values from- Returns:
- the values as a list
-
shift
Deprecated.Description copied from class:JsArrayRemoves and returns the first value from the array. -
forEach
Deprecated.Description copied from class:JsArrayInvokes the provided callback for each value in this array.
-