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 public class JreJsArray<T> extends JsArray<T>
Deprecated.Only to be used for testingJRE implementation ofJsArray, should only be used for testing.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description JreJsArray(T... values)Deprecated.Creates a new array with the given values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> List<T>asList(JsArray<T> array)Deprecated.Gets the values of this array as a list.voiddoClear()Deprecated.Internal method called to clear the array.TdoGet(int index)Deprecated.JRE implementation of the finalJsArray.get(int)method.voiddoSet(int index, T value)Deprecated.JRE implementation of the finalJsArray.set(int, Object)method.JsArray<T>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.intpush(T... values)Deprecated.Adds items to the end of this array.Tshift()Deprecated.Removes and returns the first value from the array.JsArray<T>splice(int index, int remove, T... add)Deprecated.Removes and adds a number of items at the given index.
-
-
-
Constructor Detail
-
JreJsArray
@SafeVarargs public JreJsArray(T... values)
Deprecated.Creates a new array with the given values.- Parameters:
values- the values of the new array
-
-
Method Detail
-
doGet
public T doGet(int index)
Deprecated.JRE implementation of the finalJsArray.get(int)method.- Parameters:
index- the index- Returns:
- the value at the index
-
doSet
public void doSet(int index, T value)Deprecated.JRE implementation of the finalJsArray.set(int, Object)method.- Parameters:
index- the index to setvalue- the value to set
-
push
public int push(T... values)
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
public JsArray<T> doSpliceArray(int index, int remove, JsArray<? extends T> add)
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
public JsArray<T> splice(int index, int remove, T... add)
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
public static <T> List<T> asList(JsArray<T> array)
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
public T shift()
Deprecated.Description copied from class:JsArrayRemoves and returns the first value from the array.
-
-