OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3

class $Array

Object
->Array
  ->jsx3.$Array

class $Array
extends Array
Useful extensions to the JavaScript Array class.

Since:

3.7

Fields Inherited From Array
length
Method Summary
void
addAll(a : Array)
Appends the contents of a to this array.
boolean
Returns true if o is in this array.
void
each(fct : Function)
Calls fct for each element in this array.
boolean
eq(a : Array)
Returns true if the contents of this array equal the contents of a.
jsx3.$Array
filter(fct : Function)
Creates a new array with the filtered contents of this array.
Object
find(fct : Function)
Returns the first element in this array for which fct returns true when passed the element as the sole parameter.
int
Returns the first index of o in this array.
jsx3.$Array
map(fct : Function)
Creates a new array using the mapped values of each element in this array.
Object
remove(o : Object)
Removes the first occurrence of o in this array.
jsx3.$Array
Returns a list containing only the unique elements in this list.
Methods Inherited From Array
clone, concat, contentsEqual, join, lastIndexOf, pop, push, pushAll, reverse, shift, slice, sort, splice, toString, unshift
Method Detail

addAll

void addAll(a : Array)
Appends the contents of a to this array.

Parameters:

a

contains

boolean contains(o : Object)
Returns true if o is in this array. This method uses strict equality for comparing objects (===).

Parameters:

o

Returns:

 

Overrides:

contains in Array

each

void each(fct : Function)
Calls fct for each element in this array. fct is passed each element as the sole parameter.

Parameters:

fct

eq

boolean eq(a : Array)
Returns true if the contents of this array equal the contents of a.

Parameters:

a

Returns:

 

Since:

3.9

filter

jsx3.$Array filter(fct : Function)
Creates a new array with the filtered contents of this array. fct is called for each element in this array and the element is passed as the sole argument. The new array is constructed with only the elements of this array for which fct returns true.

Parameters:

fct

Returns:

 

Overrides:

filter in Array

find

Object find(fct : Function)
Returns the first element in this array for which fct returns true when passed the element as the sole parameter.

Parameters:

fct

Returns:

 

indexOf

int indexOf(o : Object)
Returns the first index of o in this array. This method uses strict equality for comparing objects (===).

Parameters:

o

Returns:

 

Overrides:

indexOf in Array

map

jsx3.$Array map(fct : Function)
Creates a new array using the mapped values of each element in this array. fct is called for each element in this array and the element is passed as the sole argument. The new array is constructed with the return values of each call to fct. sole parameter.

Parameters:

fct

Returns:

 

Overrides:

map in Array

remove

Object remove(o : Object)
Removes the first occurrence of o in this array. This method uses strict equality for comparing objects (===).

Parameters:

o

Returns:

the removed object or undefined if o is not in this array.  

Overrides:

remove in Array

unique

jsx3.$Array unique()
Returns a list containing only the unique elements in this list.

Returns: