Packagecom.adobe.fiber.runtime.lib
Classpublic class CollectionFunc
InheritanceCollectionFunc Inheritance Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The CollectionFunc class defines the implementations of the expression runtime functions for Collections for the Adobe application modeling language.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
[static] Return the average of a collection of numeric values.
CollectionFunc
  
[static] Return the maximum value in a collection of numbers.
CollectionFunc
  
[static] Return the minimum value in a collection of numbers.
CollectionFunc
  
[static] Return the total of all numbers in a collection.
CollectionFunc
 Inherited
Indicates whether an object has a specified property defined.
Object
  
[static] Check is a collection is empty.
CollectionFunc
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
[static] Given a value and a sorted list of values, returns number of list items less than the value.
CollectionFunc
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
[static] Return the size of a collection.
CollectionFunc
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail
collectionAvg()method
public static function collectionAvg(c:ArrayCollection):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the average of a collection of numeric values. If size() of the collection is 0, or the collection is null, 0 is returned.

Parameters

c:ArrayCollection — the collection

Returns
Number — the average
collectionMax()method 
public static function collectionMax(c:ArrayCollection):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the maximum value in a collection of numbers. If size() of the collection is 0, or the collection is null, 0 is returned.

Parameters

c:ArrayCollection — a collection containing Number values

Returns
Number — the largest value in the collection
collectionMin()method 
public static function collectionMin(c:ArrayCollection):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the minimum value in a collection of numbers. If size() of the collection is 0, or the collection is null, 0 is returned.

Parameters

c:ArrayCollection — a collection containing Number values

Returns
Number — the smallest value in the collection
collectionSum()method 
public static function collectionSum(c:ArrayCollection):Number

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the total of all numbers in a collection. If size() of the collection is 0, or the collection is null, 0 is returned.

Parameters

c:ArrayCollection — the collection

Returns
Number — the sum of the collection
isEmpty()method 
public static function isEmpty(collection:ArrayCollection):Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Check is a collection is empty. If collection does not exist, it is empty.

Parameters

collection:ArrayCollection — the collection

Returns
Boolean — true if collection is empty
part()method 
public static function part(value:Object, list:ArrayCollection):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Given a value and a sorted list of values, returns number of list items less than the value. (If not sorted, returns the length of the list prefix made up of items less than value.)

For Example, given a collection C, containing [10, 20, 30], the call part(20, C) returns 1 as there is a single value (10) in the collection less than 20.

Parameters

value:Object — the value to search for
 
list:ArrayCollection — a sorted collection

Returns
int — the number of entries in the list with values less than value
sizeof()method 
public static function sizeof(collection:ArrayCollection):int

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Return the size of a collection.

Parameters

collection:ArrayCollection — the collection

Returns
int — size of collection