Array class.
Note that methods such as indexOf and remove compare objects
with the strict equality operators (=== and !==). Therefore, for the purposes of this
class 1 and "1" are not equal.| Constructor Summary | |
|---|---|
| void | The instance initializer. |
| Method Summary | |
|---|---|
| void | |
| void | |
| void | clear() Removes all elements from this list. |
| jsx3.util.List | clone() Returns a copy of this list. |
| boolean | |
| boolean | Returns true if this list and l have the same length and this.get(n) = l.get(n)
for all n. |
| jsx3.util.List | Creates a new list with the filtered contents of this list. |
| Object | |
| void | getIndex() Deprecated. Use the jsx3.util.Iterator interface instead.
|
| void | getItem(intIndex : ?) Deprecated. Use get() instead.
|
| void | Deprecated. Use size() instead.
|
| void | hasNext() Deprecated. Use the jsx3.util.Iterator interface instead.
|
| int | Returns the index of the first occurrence of objElm in this list. |
| jsx3.util.Iterator | iterator() |
| int | Returns the index of the last occurrence of objElm in this list. |
| jsx3.util.List | Object | Creates a new list with the mapped contents of this array. |
| void | move(intIndex : ?) Deprecated. Use the jsx3.util.Iterator interface instead.
|
| void | next() Deprecated. Use the jsx3.util.Iterator interface instead.
|
| void | Removes the first occurrence of objElm in this list. |
| Object | jsx3.util.List<Object> | Removes a single or a range of elements from this list. |
| void | reset() Deprecated. Use the jsx3.util.Iterator interface instead.
|
| void | |
| int | size() |
| List | Returns a section of this list as another list. |
| void | Sorts this list. |
| Array | Returns a copy of this list as an array. |
| static jsx3.util.List | wrap(a : Array | jsx3.util.List) If a is already an instance of this class, this method returns a. |
| Methods Inherited From jsx3.lang.Object |
|---|
| eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString |
| Constructor Detail |
|---|
a is a number, the list is initialized with
that size. If a is an array or list, the contents of a are copied into the new list.| Method Detail |
|---|
l have the same length and this.get(n) = l.get(n)
for all n.fctFilter parameter defines
the filtering function.function(item : Object) : boolean.jsx3.util.Iterator interface instead.
get() instead.
size() instead.
jsx3.util.Iterator interface instead.
objElm in this list. Comparisons are performed with
strict equals (===).-1 if not found.
objElm in this list. Comparisons are performed with
strict equals (===).fctMapper parameter defines
the mapping function.
This method has four modes corresponding to the four possible values for {bExpand, bObject}:
{false, false} (default) – the filtering function takes an item in this list and returns
a single object value which will take the place of the item in the mapped result.{true, false} – the filtering function takes an item in this list and returns
a single object value or an array of values, all of which will be inserted into the mapped result at the index
of the item.{false, true} – the filtering function takes an item in this list and returns an array with
exactly two values, which become a name/value pair in the mapped result.{true, true} – the filtering function takes an item in this list and returns an array with
zero or an even number of items, which become name/value pairs in the mapped result.bExpand and
bObject parameters.true, the resulting mapped array or object may any number of values
corresponding to each item in this list. Otherwise, it will have exactly one value for each item in this list.true, this array is mapped to an object with property name/value pairs.
Otherwise this array is mapped to another array.bObject parameter is null or
false, otherwise an Object.
jsx3.util.Iterator interface instead.
jsx3.util.Iterator interface instead.
objElm in this list.jsx3.util.Iterator interface instead.
a is already an instance of this class, this method returns a.
If a is an array, this method returns a new List instance backed by a.a is not a list or array.