org.stjs.javascript
Interface Array<V>
- All Superinterfaces:
- Iterable<String>
public interface Array<V>
- extends Iterable<String>
This interface represents an array from Javascript.The value may be typed. The iteration is done on the indexes to have the javascript
equivalent of
for(var key in array)
The methods are prefixed with $ to let the generator know that is should generate braket access instead, i.e
array.$get(key) => array[key]
array.$set(key, value) => array[key]=value
- Author:
- acraciun
$get
V $get(int index)
$get
V $get(String index)
$set
void $set(int index,
V value)
$set
void $set(String index,
V value)
$length
int $length()
$length
void $length(int newLength)
concat
Array<V> concat(Array<V>... arrays)
indexOf
int indexOf(V element)
indexOf
int indexOf(V element,
int start)
join
String join()
join
String join(String separator)
pop
V pop()
push
int push(V... values)
reverse
void reverse()
shift
V shift()
slice
Array<V> slice(int start)
slice
Array<V> slice(int start,
int end)
splice
Array<V> splice(int start)
splice
Array<V> splice(int start,
int howMany)
splice
Array<V> splice(int start,
int howMany,
V... values)
sort
void sort(SortFunction<V> function)
unshift
int unshift(V... values)
forEach
void forEach(Callback1<V> callback)
Copyright © 2012. All Rights Reserved.