Packagevegas.vo
Classpublic class FilterVO
InheritanceFilterVO Inheritance SimpleValueObject Inheritance Object

This class provides a binary filter value object.

Example :

     import vegas.vo.FilterVO ;
     
     var VIDEO :uint = 1 ;
     var MP3   :uint = 2 ; 
     
     var filter:FilterVO = new FilterVO() ;
     
     trace( "filter : " +  filter ) ;
     
     filter.toggleFilter( VIDEO , true ) ;
     
     trace( "filter : " +  filter ) ;
     
     trace( "filter.toggleFilter( MP3, true ) : " + filter.toggleFilter( MP3, true ) ) ;
     trace( "filter.toggleFilter( MP3, true ) : " + filter.toggleFilter( MP3, true ) ) ;
     
     trace("filter : " +  filter ) ;
     
     filter.toggleFilter( VIDEO , false ) ;
     
     trace( "filter : " +  filter ) ;
     
     trace( "filter.contains( VIDEO ) : " + filter.contains( VIDEO ) ) ;
     trace( "filter.contains( MP3 )   : " + filter.contains( MP3 ) ) ;
     



Public Properties
 PropertyDefined By
  filter : Number
The filter value of this object.
FilterVO
 Inheritedid : *
Indicates the id of this ValueObject.
SimpleValueObject
  NONE : Number = 0
[static] The default filter value of the filter value objects.
FilterVO
Public Methods
 MethodDefined By
  
FilterVO(init:Object = null)
Creates a new FilterVO instance.
FilterVO
  
clear():void
Clear the filter value.
FilterVO
  
contains(value:Number):Boolean
Returns true if the filter number value contains the option number value.
FilterVO
 Inherited
equals(o:*):Boolean
Compares the specified object with this object for equality.
SimpleValueObject
 Inherited
formatToString(className:String = null, ... args):String
A utility function for implementing the toString() method.
SimpleValueObject
  
getFilter():Number
Returns the current filter value of this object.
FilterVO
  
isNone():Boolean
Returns true if the filter is NONE.
FilterVO
  
register(aliasName:String = FilterVO):void
[static] Preserves the class (type) of an object when the object is encoded in Action Message Format (AMF).
FilterVO
  
setFilter(n:Number):void
Sets the current filter value of this object.
FilterVO
  
toggleFilter(value:Number, b:Boolean):Boolean
Toggle a filter value in this filter object.
FilterVO
  
toObject():Object
[override] Returns the Object representation of this object.
FilterVO
  
toSource(indent:int = 0):String
[override] Returns the source code string representation of the object.
FilterVO
  
toString():String
[override] Returns the String representation of this object.
FilterVO
Property Detail
filterproperty
public var filter:Number

The filter value of this object.

NONEproperty 
public static var NONE:Number = 0

The default filter value of the filter value objects.

Constructor Detail
FilterVO()Constructor
public function FilterVO(init:Object = null)

Creates a new FilterVO instance.

Parameters
init:Object (default = null) — (optional) The default filter value of this value object.
Method Detail
clear()method
public function clear():void

Clear the filter value.

contains()method 
public function contains(value:Number):Boolean

Returns true if the filter number value contains the option number value.

Parameters

value:Number

Returns
Booleantrue if the filter number value contains the option number value.
getFilter()method 
public function getFilter():Number

Returns the current filter value of this object.

Returns
Number — the current filter value of this object.
isNone()method 
public function isNone():Boolean

Returns true if the filter is NONE.

Returns
Booleantrue if the filter is NONE.
register()method 
public static function register(aliasName:String = FilterVO):void

Preserves the class (type) of an object when the object is encoded in Action Message Format (AMF).

Parameters

aliasName:String (default = FilterVO)

setFilter()method 
public function setFilter(n:Number):void

Sets the current filter value of this object.

Parameters

n:Number

toggleFilter()method 
public function toggleFilter(value:Number, b:Boolean):Boolean

Toggle a filter value in this filter object.

Parameters

value:Number
 
b:Boolean

Returns
Boolean
toObject()method 
override public function toObject():Object

Returns the Object representation of this object.

Returns
Object — the Object representation of this object.
toSource()method 
override public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters

indent:int (default = 0)

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

Returns the String representation of this object.

Returns
String — the String representation of this object.