Packageorg.restfulx.collections
Classpublic class RxCollection
InheritanceRxCollection Inheritance mx.collections.ArrayCollection
SubclassesModelsCollection

Adds a few handy general purpose methods to mx.collections.ArrayCollection. These helpers are not RxModel specific and can be used instead of any regular ArrayCollection instance.

One of the things you can do with RxCollection is set multiple filter functions. They are evaluated one by one with the end result being false if ANY of the filter functions is false. Much like an OR.


Example
Given 2 or more filter functions you can:
    var rc:RxCollection = new RxCollection;
    // add some data
    rc.filterFunctions = [function1, function2, function3]
    rc.refresh();
   



Public Properties
 PropertyDefined by
  filterFunctions : Array
RxCollection
Public Methods
 MethodDefined by
  
RxCollection(source:Array = null)
RxCollection
  
indexOfPropertyValue(propertyName:String, propertyValue:Object):int
Find index of the first item with a given property name/ value pair.
RxCollection
  
itemsWithPropertyValue(propertyName:String, propertyValue:Object):RxCollection
Returns a RxCollection of llobjects in the collection that have specified property key and value
RxCollection
  
withPropertyValue(propertyName:String, propertyValue:Object):Object
Attempts to find irstobject in the collection that has specified property key and value
RxCollection
Property detail
filterFunctionsproperty
filterFunctions:Array  [read-write]

Implementation
    public function get filterFunctions():Array
    public function set filterFunctions(value:Array):void

See also

mx.collections.ArrayCollection
Constructor detail
RxCollection()constructor
public function RxCollection(source:Array = null)

Parameters
source:Array (default = null)

See also

mx.collections.ArrayCollection
Method detail
indexOfPropertyValue()method
public function indexOfPropertyValue(propertyName:String, propertyValue:Object):int

Find index of the first item with a given property name/ value pair.

Parameters
propertyName:String — name of the property
 
propertyValue:Object — value of the property

Returns
int — index offset
itemsWithPropertyValue()method 
public function itemsWithPropertyValue(propertyName:String, propertyValue:Object):RxCollection

Returns a RxCollection of llobjects in the collection that have specified property key and value

Parameters
propertyName:String — name of the property to look up
 
propertyValue:Object — value of the property

Returns
RxCollection — a RxCollection of llobjects that match; empty Array if none
withPropertyValue()method 
public function withPropertyValue(propertyName:String, propertyValue:Object):Object

Attempts to find irstobject in the collection that has specified property key and value

Parameters
propertyName:String — name of the property to look up
 
propertyValue:Object — value of the property

Returns
Object — irstobject that matches or null