| Package | vegas.data.array |
| Class | public class ArrayFilter |
| Inheritance | ArrayFilter CoreEventDispatcher CoreObject |
Example :
import vegas.data.array.ArrayFilter ;
import vegas.events.BasicEvent ;
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 ( e:BasicEvent ):Void
{
trace( e ) ;
}
var af:ArrayFilter = ArrayFilter.getInstance() ;
af.addEventListener( ArrayFilter.CHANGE, 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 | ||
|---|---|---|---|
| CASEINSENSITIVE : uint = 1.0 [static]
Specifies case-insensitive sorting for the Array class sorting methods.
| ArrayFilter | ||
| CHANGE : String = "change" [static]
The change event occurs when the filter value is changed.
| ArrayFilter | ||
![]() | channel : String
Indicates the channel of this dispatcher if this instance is global.
| CoreEventDispatcher | |
| DESCENDING : uint = 2.0 [static]
Specifies descending sorting for the Array class sorting methods.
| ArrayFilter | ||
| filter : uint
Returns the current filter value of this object.
| ArrayFilter | ||
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
| 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 | ||
| useEvent : Boolean = true
Indicates if the change event is notify or not when the filter value change.
| ArrayFilter | ||
| Method | Defined by | ||
|---|---|---|---|
|
ArrayFilter(value:uint = 0, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ArrayFilter instance.
| ArrayFilter | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
| CoreEventDispatcher | |
|
contains(nFilter:uint, nOption:uint):Boolean
[static]
Returns
true if the filter number value contains the option number value. | ArrayFilter | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
|
getEventTypeCHANGE():String
Returns the event name of the change event of this object.
| ArrayFilter | ||
|
getFilter():uint
Returns the current filter value of this object.
| ArrayFilter | ||
|
[static]
Returns the singleton reference of this class.
| ArrayFilter | ||
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
|
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 | ||
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
|
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 | ||
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
|
notifyChange():void
Notify a change in this object.
| ArrayFilter | ||
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
| CoreEventDispatcher | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
|
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 | ||
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
|
setEventTypeCHANGE(type:String):void
Sets the event name of the change event of this object.
| ArrayFilter | ||
|
setFilter(n:uint):void
Sets the current filter value of this object.
| ArrayFilter | ||
![]() |
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global
EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
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 a eden String representation of the object.
| ArrayFilter | ||
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| CoreEventDispatcher | |
| CASEINSENSITIVE | property |
public static var 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.
| CHANGE | property |
public static var CHANGE:String = "change"The change event occurs when the filter value is changed.
| DESCENDING | property |
public static var 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.
| filter | property |
filter:uint [read-write]Returns the current filter value of this object.
Implementation public function get filter():uint
public function set filter(value:uint):void
| NONE | property |
public static var NONE:uint = 0Specifies the default numeric sorting value for the Array class sorting methods.
The value of this constant is 0.
| NUMERIC | property |
public static var 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 | property |
public static var 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 | property |
public static var 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.
| useEvent | property |
public var useEvent:Boolean = trueIndicates if the change event is notify or not when the filter value change.
| ArrayFilter | () | constructor |
public function ArrayFilter(value:uint = 0, bGlobal:Boolean = false, sChannel:String = null)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).
|
|
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
|
|
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
|
| contains | () | method |
public static function contains(nFilter:uint, nOption:uint):Boolean
Returns true if the filter number value contains the option number value.
nFilter:uint |
|
nOption:uint |
Boolean — true if the filter number value contains the option number value.
|
| getEventTypeCHANGE | () | method |
public function getEventTypeCHANGE():StringReturns the event name of the change event of this object.
ReturnsString — the event name of the change event of this object.
|
| getFilter | () | method |
public function getFilter():uintReturns the current filter value of this object.
Returnsuint — the current filter value of this object.
|
| getInstance | () | method |
public static function getInstance():ArrayFilterReturns the singleton reference of this class.
ReturnsArrayFilter —
the singleton reference of this class.
|
| 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():voidNotify a change in this object.
| setCaseInsensitive | () | method |
public function setCaseInsensitive(b:Boolean):voidSets the CASEINSENSITIVE option value in the current filter.
Parametersb:Boolean |
| setDescending | () | method |
public function setDescending(b:Boolean):voidSets the DESCENDING option value in the current filter.
Parametersb:Boolean |
| setEventTypeCHANGE | () | method |
public function setEventTypeCHANGE(type:String):voidSets the event name of the change event of this object.
Parameterstype:String |
| setFilter | () | method |
public function setFilter(n:uint):voidSets the current filter value of this object.
Parametersn:uint |
| 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.
Parametersb:Boolean |
| setReturnIndexedArray | () | method |
public function setReturnIndexedArray(b:Boolean):voidSets the RETURNINDEXEDARRAY option value in the current filter.
Parametersb:Boolean |
| setUniqueSort | () | method |
public function setUniqueSort(b:Boolean):voidSets the UNIQUESORT option value in the current filter.
Parametersb:Boolean |
| toSource | () | method |
public override function toSource(indent:int = 0):StringReturns a eden String representation of the object.
Parametersindent:int (default = 0) |
String — a string representation the source code of the object.
|