
public final class JsArrayOfInt extends JsArrayInteger implements ArrayOfInt
ArrayOfInt.| Modifier | Constructor and Description |
|---|---|
protected |
JsArrayOfInt() |
| Modifier and Type | Method and Description |
|---|---|
JsArrayOfInt |
concat(ArrayOfInt values)
Returns a new array that is the concatenation of this array and
values. |
boolean |
contains(int value)
Indicates whether the array contains the specified value.
|
static JsArrayOfInt |
create()
Create a new empty instance.
|
int |
indexOf(int value)
Returns the index of the specified value or
-1 if the value is
not found. |
void |
insert(int index,
int 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. |
int |
peek()
Returns the last value of the array;
|
int |
pop()
Remove and return the element from the end of the array.
|
void |
remove(int value)
Searches for the specified value in the array and removes the first
occurrence if found.
|
void |
removeByIndex(int index)
Removes the element at the specified index.
|
void |
sort()
Sorts the contents of the array in ascending order.
|
void |
sort(CanCompareInt comparator)
Sorts the contents of the Array based on the
CanCompareInt. |
JsArrayOfInt |
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 JsArrayOfInt create()
public JsArrayOfInt concat(ArrayOfInt values)
ArrayOfInt
values. This method does not mutate the current array.concat in interface ArrayOfIntpublic boolean contains(int value)
ArrayOfIntcontains in interface ArrayOfIntpublic int indexOf(int value)
ArrayOfInt-1 if the value is
not found.indexOf in interface ArrayOfIntpublic void insert(int index,
int value)
ArrayOfIntinsert in interface ArrayOfIntpublic boolean isEmpty()
ArrayOfIntisEmpty in interface ArrayOfIntpublic boolean isSet(int index)
ArrayOfIntindex has been initialized to a valid
value.isSet in interface ArrayOfIntpublic int peek()
ArrayOfIntpeek in interface ArrayOfIntpublic int pop()
ArrayOfIntpop in interface ArrayOfIntpublic void remove(int value)
ArrayOfIntremove in interface ArrayOfIntpublic void removeByIndex(int index)
ArrayOfIntremoveByIndex in interface ArrayOfIntpublic void sort()
ArrayOfIntsort in interface ArrayOfIntpublic void sort(CanCompareInt comparator)
ArrayOfIntCanCompareInt.sort in interface ArrayOfIntpublic JsArrayOfInt splice(int index, int count)
ArrayOfIntsplice in interface ArrayOfIntCopyright © 2016. All rights reserved.