Packagesystem.data.arrays
Classpublic class ArrayFilter
InheritanceArrayFilter Inheritance Object
Implements Serializable

This filter contains all constants and methods to sort the Arrays in the application.

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() ;
     



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
  
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
  
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
  
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
Public Constants
 ConstantDefined 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
Property Detail
changeproperty
change:Signal  [read-only]

Indicates the signal invoked when the filter is changed.


Implementation
    public function get change():Signal
filterproperty 
filter:uint

Returns the current filter value of this object.


Implementation
    public function get filter():uint
    public function set filter(value:uint):void
Constructor Detail
ArrayFilter()Constructor
public function ArrayFilter(value:uint = 0)

Creates a new ArrayFilter instance.

Parameters
value:uint (default = 0) — the default filter value of this instance. If this argument is null the filter value is ArrayFilter.NONE(0).
Method Detail
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

Returns
Booleantrue 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.

Returns
Booleantrue 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.

Returns
Booleantrue if the DESCENDING option value exist in the current filter.
isNone()method 
public function isNone():Boolean

Returns true if the filter is NONE.

Returns
Booleantrue if the filter is NONE.
isNumeric()method 
public function isNumeric():Boolean

Returns true if the NUMERIC option value exist in the current filter.

Returns
Booleantrue 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.

Returns
Booleantrue 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.

Returns
Booleantrue if the UNIQUESORT option value exist in the current filter.
notifyChange()method 
public function notifyChange():void

Emit from the "change" signal when the filter is changed.

setCaseInsensitive()method 
public function setCaseInsensitive(b:Boolean):void

Sets the CASEINSENSITIVE option value in the current filter.

Parameters

b:Boolean

setDescending()method 
public function setDescending(b:Boolean):void

Sets the DESCENDING option value in the current filter.

Parameters

b:Boolean

setNone()method 
public function setNone():void

Sets the NONE option value in the current filter.

setNumeric()method 
public function setNumeric(b:Boolean):void

Sets the NUMERIC option value in the current filter.

Parameters

b:Boolean

setReturnIndexedArray()method 
public function setReturnIndexedArray(b:Boolean):void

Sets the RETURNINDEXEDARRAY option value in the current filter.

Parameters

b:Boolean

setUniqueSort()method 
public function setUniqueSort(b:Boolean):void

Sets the UNIQUESORT option value in the current filter.

Parameters

b:Boolean

toSource()method 
public function toSource(indent:int = 0):String

Returns the source representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source representation of the object.
toString()method 
public function toString():String

Returns the String representation of the object.

Returns
String — the String representation of the object.
Constant Detail
CASEINSENSITIVEConstant
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.

DESCENDINGConstant 
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.

NONEConstant 
public static const NONE:uint = 0

Specifies the default numeric sorting value for the Array class sorting methods.

The value of this constant is 0.

NUMERICConstant 
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.

RETURNINDEXEDARRAYConstant 
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.

UNIQUESORTConstant 
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.