| Package | system.data.arrays |
| Class | public class ArrayFilter |
| Inheritance | ArrayFilter Object |
| Implements | Serializable |
Example :
import system.data.arrays.ArrayFilter ;
var debug:Function = function ():Void
{
trace("filter : " + af.filter ) ;
trace("is NONE : " + af.isNone() )
trace("is CASEINSENSITIVE : " + af.isCaseInsensitive() ) ;
trace("is DESCENDING : " + af.isDescending() ) ;
trace("is NUMERIC : " + af.isNumeric() ) ;
trace("is RETURNINDEXEDARRAY : " + af.isReturnIndexedArray() ) ;
trace("is UNIQUESORT : " + af.isUniqueSort() ) ;
trace("---") ;
}
var change:Function = function ( filter:ArrayFilter ):Void
{
trace( "change : " + filter ) ;
}
var af:ArrayFilter = new ArrayFilter() ;
af.change.connect( change ) ;
debug() ;
af.setCaseInsensitive( true ) ;
af.setDescending( true ) ;
af.setNumeric( true ) ;
af.setReturnIndexedArray( true ) ;
af.setUniqueSort( true ) ;
debug() ;
af.setCaseInsensitive( false ) ;
debug() ;
af.setDescending( false ) ;
debug() ;
af.setNumeric( false ) ;
debug() ;
af.setReturnIndexedArray( false) ;
debug() ;
af.setUniqueSort( false ) ;
debug() ;
| Property | Defined By | ||
|---|---|---|---|
| change : Signal [read-only]
Indicates the signal invoked when the filter is changed. | ArrayFilter | ||
| filter : uint
Returns the current filter value of this object. | ArrayFilter | ||
| Method | Defined By | ||
|---|---|---|---|
ArrayFilter(value:uint = 0)
Creates a new ArrayFilter instance. | ArrayFilter | ||
contains(nFilter:uint, nOption:uint):Boolean [static]
Returns true if the filter number value contains the option number value. | ArrayFilter | ||
isCaseInsensitive():Boolean
Returns true if the CASEINSENSITIVE option value exist in the current filter. | ArrayFilter | ||
isDescending():Boolean
Returns true if the DESCENDING option value exist in the current filter. | ArrayFilter | ||
isNone():Boolean
Returns true if the filter is NONE. | ArrayFilter | ||
isNumeric():Boolean
Returns true if the NUMERIC option value exist in the current filter. | ArrayFilter | ||
isReturnIndexedArray():Boolean
Returns true if the RETURNINDEXEDARRAY option value exist in the current filter. | ArrayFilter | ||
isUniqueSort():Boolean
Returns true if the UNIQUESORT option value exist in the current filter. | ArrayFilter | ||
notifyChange():void
Emit from the "change" signal when the filter is changed. | ArrayFilter | ||
setCaseInsensitive(b:Boolean):void
Sets the CASEINSENSITIVE option value in the current filter. | ArrayFilter | ||
setDescending(b:Boolean):void
Sets the DESCENDING option value in the current filter. | ArrayFilter | ||
setNone():void
Sets the NONE option value in the current filter. | ArrayFilter | ||
setNumeric(b:Boolean):void
Sets the NUMERIC option value in the current filter. | ArrayFilter | ||
setReturnIndexedArray(b:Boolean):void
Sets the RETURNINDEXEDARRAY option value in the current filter. | ArrayFilter | ||
setUniqueSort(b:Boolean):void
Sets the UNIQUESORT option value in the current filter. | ArrayFilter | ||
toSource(indent:int = 0):String
Returns the source representation of the object. | ArrayFilter | ||
toString():String
Returns the String representation of the object. | ArrayFilter | ||
| Constant | Defined By | ||
|---|---|---|---|
| CASEINSENSITIVE : uint = 1.0 [static]
Specifies case-insensitive sorting for the Array class sorting methods. | ArrayFilter | ||
| DESCENDING : uint = 2.0 [static]
Specifies descending sorting for the Array class sorting methods. | ArrayFilter | ||
| NONE : uint = 0 [static]
Specifies the default numeric sorting value for the Array class sorting methods. | ArrayFilter | ||
| NUMERIC : uint = 16.0 [static]
Specifies numeric (instead of character-string) sorting for the Array class sorting methods. | ArrayFilter | ||
| RETURNINDEXEDARRAY : uint = 8.0 [static]
Specifies that a sort returns an array that consists of array indices as a result of calling
the sort() or sortOn() method. | ArrayFilter | ||
| UNIQUESORT : uint = 4.0 [static]
Specifies the unique sorting requirement for the Array class sorting methods. | ArrayFilter | ||
| change | property |
change:Signal [read-only] Indicates the signal invoked when the filter is changed.
public function get change():Signal| filter | property |
filter:uintReturns the current filter value of this object.
public function get filter():uint public function set filter(value:uint):void| ArrayFilter | () | Constructor |
public function ArrayFilter(value:uint = 0)Creates a new ArrayFilter instance.
Parametersvalue:uint (default = 0) — the default filter value of this instance. If this argument is null the filter value is ArrayFilter.NONE(0).
|
| contains | () | method |
public static function contains(nFilter:uint, nOption:uint):Boolean
Returns true if the filter number value contains the option number value.
Parameters
nFilter:uint | |
nOption:uint |
Boolean — true if the filter number value contains the option number value.
|
| isCaseInsensitive | () | method |
public function isCaseInsensitive():Boolean
Returns true if the CASEINSENSITIVE option value exist in the current filter.
Boolean — true if the CASEINSENSITIVE option value exist in the current filter.
|
| isDescending | () | method |
public function isDescending():Boolean
Returns true if the DESCENDING option value exist in the current filter.
Boolean — true if the DESCENDING option value exist in the current filter.
|
| isNone | () | method |
public function isNone():Boolean
Returns true if the filter is NONE.
Boolean — true if the filter is NONE.
|
| isNumeric | () | method |
public function isNumeric():Boolean
Returns true if the NUMERIC option value exist in the current filter.
Boolean — true if the NUMERIC option value exist in the current filter.
|
| isReturnIndexedArray | () | method |
public function isReturnIndexedArray():Boolean
Returns true if the RETURNINDEXEDARRAY option value exist in the current filter.
Boolean — true if the RETURNINDEXEDARRAY option value exist in the current filter.
|
| isUniqueSort | () | method |
public function isUniqueSort():Boolean
Returns true if the UNIQUESORT option value exist in the current filter.
Boolean — true if the UNIQUESORT option value exist in the current filter.
|
| notifyChange | () | method |
public function notifyChange():voidEmit from the "change" signal when the filter is changed.
| setCaseInsensitive | () | method |
public function setCaseInsensitive(b:Boolean):voidSets the CASEINSENSITIVE option value in the current filter.
Parameters
b:Boolean |
| setDescending | () | method |
public function setDescending(b:Boolean):voidSets the DESCENDING option value in the current filter.
Parameters
b:Boolean |
| setNone | () | method |
public function setNone():voidSets the NONE option value in the current filter.
| setNumeric | () | method |
public function setNumeric(b:Boolean):voidSets the NUMERIC option value in the current filter.
Parameters
b:Boolean |
| setReturnIndexedArray | () | method |
public function setReturnIndexedArray(b:Boolean):voidSets the RETURNINDEXEDARRAY option value in the current filter.
Parameters
b:Boolean |
| setUniqueSort | () | method |
public function setUniqueSort(b:Boolean):voidSets the UNIQUESORT option value in the current filter.
Parameters
b:Boolean |
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source representation of the object.
Parameters
indent:int (default = 0) |
String — the source representation of the object.
|
| toString | () | method |
public function toString():StringReturns the String representation of the object.
ReturnsString — the String representation of the object.
|
| CASEINSENSITIVE | Constant |
public static const CASEINSENSITIVE:uint = 1.0
Specifies case-insensitive sorting for the Array class sorting methods. You can use this constant
for the options parameter in the sort() or sortOn() method.
The value of this constant is 1.
| DESCENDING | Constant |
public static const DESCENDING:uint = 2.0
Specifies descending sorting for the Array class sorting methods.
You can use this constant for the options parameter in the sort()
or sortOn() method.
The value of this constant is 2.
| NONE | Constant |
public static const NONE:uint = 0Specifies the default numeric sorting value for the Array class sorting methods.
The value of this constant is 0.
| NUMERIC | Constant |
public static const NUMERIC:uint = 16.0
Specifies numeric (instead of character-string) sorting for the Array class sorting methods.
Including this constant in the options
parameter causes the sort() and sortOn() methods
to sort numbers as numeric values, not as strings of numeric characters.
Without the NUMERIC constant, sorting treats each array element as a
character string and produces the results in Unicode order.
For example, given the array of values [2005, 7, 35], if the NUMERIC
constant is not included in the options parameter, the
sorted array is [2005, 35, 7], but if the NUMERIC constant is included,
the sorted array is [7, 35, 2005].
This constant applies only to numbers in the array; it does
not apply to strings that contain numeric data such as ["23", "5"].
The value of this constant is 16.
| RETURNINDEXEDARRAY | Constant |
public static const RETURNINDEXEDARRAY:uint = 8.0
Specifies that a sort returns an array that consists of array indices as a result of calling
the sort() or sortOn() method. You can use this constant
for the options parameter in the sort() or sortOn()
method, so you have access to multiple views on the array elements while the original array is unmodified.
The value of this constant is 8.
| UNIQUESORT | Constant |
public static const UNIQUESORT:uint = 4.0
Specifies the unique sorting requirement for the Array class sorting methods.
You can use this constant for the options parameter in the sort() or sortOn() method.
The unique sorting option terminates the sort if any two elements or fields being sorted have identical values.
The value of this constant is 4.