Package | org.restfulx.collections |
Class | public class RxCollection |
Inheritance | RxCollection mx.collections.ArrayCollection |
Subclasses | ModelsCollection |
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.
var rc:RxCollection = new RxCollection; // add some data rc.filterFunctions = [function1, function2, function3] rc.refresh();
Property | Defined by | ||
---|---|---|---|
filterFunctions : Array | RxCollection |
Method | Defined 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 |
filterFunctions | property |
filterFunctions:Array
[read-write]Implementation
public function get filterFunctions():Array
public function set filterFunctions(value:Array):void
See also
RxCollection | () | constructor |
public function RxCollection(source:Array = null)
Parameters
source:Array (default = null )
|
See also
indexOfPropertyValue | () | method |
public function indexOfPropertyValue(propertyName:String, propertyValue:Object):int
Find index of the first item with a given property name/ value pair.
ParameterspropertyName:String — name of the property
|
|
propertyValue:Object — value of the property
|
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
ParameterspropertyName:String — name of the property to look up
|
|
propertyValue:Object — value of the property
|
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
ParameterspropertyName:String — name of the property to look up
|
|
propertyValue:Object — value of the property
|
Object — irstobject that matches or null
|