com.adobe.fiber.runtime.lib

# CollectionFunc - AS3 ADEP Data Services

Package | com.adobe.fiber.runtime.lib
Class | public class CollectionFunc
Inheritance | CollectionFunc Object

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | collectionAvg(c:ArrayCollection):Number [static] Returns the average of a collection of numeric values. | CollectionFunc
|  | collectionMax(c:ArrayCollection):Number [static] Returns the maximum value in a collection of numbers. | CollectionFunc
|  | collectionMin(c:ArrayCollection):Number [static] Returns the minimum value in a collection of numbers. | CollectionFunc
|  | collectionSum(c:ArrayCollection):Number [static] Returns the total of all numbers in a collection. | CollectionFunc
|  | contains(c:ArrayCollection, item:Object):Boolean [static] Checks if a collection contains a given item. | CollectionFunc
|  | count(collection:ArrayCollection):int [static] Returns the number of elements (the size) of a collection. | CollectionFunc
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isEmpty(collection:ArrayCollection):Boolean [static] Checks if a collection is empty. | CollectionFunc
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | part(value:Object, list:ArrayCollection):int [static] Given a value and a sorted list of values, returns number of list items less than the value. | CollectionFunc
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | sizeof(collection:ArrayCollection):int [static] Returns the size of a collection. | CollectionFunc
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object 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: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns 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` — Collection

Returns

| `Number` — The average

### collectionMax

()
method

`public static function collectionMax(c:ArrayCollection):Number`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns 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` — Collection containing Number values

Returns

| `Number` — Largest value in the collection

### collectionMin

()
method

`public static function collectionMin(c:ArrayCollection):Number`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns 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` — Collection containing Number values

Returns

| `Number` — Smallest value in the collection

### collectionSum

()
method

`public static function collectionSum(c:ArrayCollection):Number`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns 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` — Collection

Returns

| `Number` — Sum of the collection

### contains

()
method

`public static function contains(c:ArrayCollection, item:Object):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5

Runtime Versions: | Flash Player 9, AIR 1.1

Checks if a collection contains a given item. If the collection is empty, it doesn't contain the item. If the item is null or undefined it can still be contained in the collection.

Parameters

| `c:ArrayCollection` — Collection
| `item:Object` — Object to test

Returns

| `Boolean` — true if item is contained in collection c

### count

()
method

`public static function count(collection:ArrayCollection):int`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5

Runtime Versions: | Flash Player 9, AIR 1.1

Returns the number of elements (the size) of a collection. Equivalent to sizeof.

Parameters

| `collection:ArrayCollection` — The collection

Returns

| `int` — Size of collection

### isEmpty

()
method

`public static function isEmpty(collection:ArrayCollection):Boolean`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Checks if a collection is empty. If collection does not exist, it is empty.

Parameters

| `collection:ArrayCollection` — 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: | Adobe Digital Enterprise Platform Data Services for Java EE 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` — Value to search for
| `list:ArrayCollection` — Sorted collection

Returns

| `int` — 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: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns the size of a collection. Equivalent to count.

Parameters

| `collection:ArrayCollection` — The collection

Returns

| `int` — Size of collection

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00