
public final class JsArrayOfNumber extends JsArrayNumber implements ArrayOfNumber
ArrayOfNumber.| Modifier | Constructor and Description |
|---|---|
protected |
JsArrayOfNumber() |
| Modifier and Type | Method and Description |
|---|---|
JsArrayOfNumber |
concat(ArrayOfNumber values)
Returns a new array that is the concatenation of this array and
values. |
static JsArrayOfNumber |
create()
Create a new empty instance.
|
void |
insert(int index,
double value)
Inserts a new element into the array at the specified index.
|
boolean |
isEmpty()
Returns true if the length of the array is zero.
|
boolean |
isSet(int index)
Check that the specified
index has been initialized to a valid
value. |
double |
peek()
Returns the last value of the array;
|
double |
pop()
Remove and return the element from the end of the array.
|
void |
removeByIndex(int index)
Removes the element at the specified index.
|
void |
sort()
Sorts the contents of the array in ascending order.
|
void |
sort(CanCompareNumber comparator)
Sorts the contents of the Array based on the
CanCompareNumber. |
JsArrayOfNumber |
splice(int index,
int count)
Removes the specified number of elements starting at index and returns the
removed elements.
|
get, join, join, length, push, set, setLength, shift, unshiftcast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringpublic static JsArrayOfNumber create()
public JsArrayOfNumber concat(ArrayOfNumber values)
ArrayOfNumber
values. This method does not mutate the current array.concat in interface ArrayOfNumberpublic void insert(int index,
double value)
ArrayOfNumberinsert in interface ArrayOfNumberpublic boolean isEmpty()
ArrayOfNumberisEmpty in interface ArrayOfNumberpublic boolean isSet(int index)
ArrayOfNumberindex has been initialized to a valid
value.isSet in interface ArrayOfNumberpublic double peek()
ArrayOfNumberpeek in interface ArrayOfNumberpublic double pop()
ArrayOfNumberpop in interface ArrayOfNumberpublic void removeByIndex(int index)
ArrayOfNumberremoveByIndex in interface ArrayOfNumberpublic void sort()
ArrayOfNumbersort in interface ArrayOfNumberpublic void sort(CanCompareNumber comparator)
ArrayOfNumberCanCompareNumber.sort in interface ArrayOfNumberpublic JsArrayOfNumber splice(int index, int count)
ArrayOfNumbersplice in interface ArrayOfNumberCopyright © 2016. All rights reserved.