This class consists exclusively of static methods that operate on or return collections.
public static function copy(src:IList, dest:IList):void
Copies all of the elements from one list into another. After the
operation, the index of each copied element in the destination list
will be identical to its index in the source list.
Parameters
| src:IList — source list.
|
| |
| dest:IList — destination list.
|
public static function disjoint(c1:ICollection, c2:ICollection):Boolean
Returns true if the two specified collections have no elements in common.
Parameters
Returns
| Boolean — true if the two specified collections have no elements in common
|
public static function fill(list:IList, o:*):void
Replaces all of the elements of the specified list with the specified element.
Parameters
| list:IList — IList to be filled
|
| |
| o:* — element with which to fill the specified list
|
public static function max(list:IList, cmp:IComparator):*
Returns the maximum element of the given collection, according to the order induced
by the spedified IComparator.
Parameters
Returns
| * — the maximum element of the given collection, according to the order induced
by the specified IComparator
|
public static function min(list:IList, cmp:IComparator):*
Returns the minimum element of the given collection, according to the order induced
by the spedified IComparator.
Parameters
Returns
| * — the minimum element of the given collection, according to the order induced
by the specified IComparator
|
public static function replaceAll(list:IList, oldVal:*, newVal:*):Boolean
Replaces all occurrences of one specified value in a list with another.
Parameters
| list:IList — IList
|
| |
| oldVal:* — old value to be replaced
|
| |
| newVal:* — new value with which oldVal is to be replaced
|
Returns
| Boolean — true if at least one element was replaced
|
public static function reverse(list:IList):void
Reverses the order of the elements in the specified list.
Parameters
| list:IList — IList to be reversed
|
public static function rotate(list:IList, distance:int):void
Rotates the elements in the specified list by the specified distance.
Parameters
| list:IList — IList
|
| |
| distance:int — distance to rotate the list. It may be zero, negative, or greater
than list.size()
|
public static function shuffle(list:IList):void
Randomly permutes the specified list using Math.random().
Parameters
| list:IList — IList to be randomly shuffled
|
public static function sort(list:IList, comp:IComparator):void
Sorts a IList with a given IComparator.
Parameters
Copyright 2009 - Tim Richter