
public final class JsArrayOfString extends JsArrayString implements ArrayOfString
ArrayOfString.| Modifier | Constructor and Description |
|---|---|
protected |
JsArrayOfString() |
| Modifier and Type | Method and Description |
|---|---|
JsArrayOfString |
concat(ArrayOfString values)
Returns a new array that is the concatenation of this array and
values. |
boolean |
contains(String value)
Indicates whether the array contains the specified value.
|
static JsArrayOfString |
create()
Create a new empty instance.
|
int |
indexOf(String value)
Returns the index of the specified value or
-1 if the value is
not found. |
void |
insert(int index,
String value)
Inserts a new element into the array at the specified index.
|
boolean |
isEmpty()
Returns true if the length of the array is zero.
|
String |
peek()
Returns the last value of the array;
|
String |
pop()
Remove and return the element from the end of the array.
|
void |
remove(String 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(CanCompareString comparator)
Sorts the contents of the Array based on the
CanCompareString. |
JsArrayOfString |
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 JsArrayOfString create()
public JsArrayOfString concat(ArrayOfString values)
ArrayOfString
values. This method does not mutate the current array.concat in interface ArrayOfStringpublic boolean contains(String value)
ArrayOfStringcontains in interface ArrayOfStringpublic int indexOf(String value)
ArrayOfString-1 if the value is
not found.indexOf in interface ArrayOfStringpublic void insert(int index,
String value)
ArrayOfStringinsert in interface ArrayOfStringpublic boolean isEmpty()
ArrayOfStringisEmpty in interface ArrayOfStringpublic String peek()
ArrayOfStringpeek in interface ArrayOfStringpublic String pop()
ArrayOfStringpop in interface ArrayOfStringpublic void remove(String value)
ArrayOfStringremove in interface ArrayOfStringpublic void removeByIndex(int index)
ArrayOfStringremoveByIndex in interface ArrayOfStringpublic void sort()
ArrayOfStringsort in interface ArrayOfStringpublic void sort(CanCompareString comparator)
ArrayOfStringCanCompareString.sort in interface ArrayOfStringpublic JsArrayOfString splice(int index, int count)
ArrayOfStringsplice in interface ArrayOfStringCopyright © 2016. All rights reserved.