Packagevegas.models.queues
Classpublic class QueueModelObject
InheritanceQueueModelObject Inheritance CoreModelObject Inheritance CoreModel Inheritance CoreEventDispatcher Inheritance Object

This model use an internal Queue to register value objects.



Public Properties
 PropertyDefined By
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 Inheritedid : *
Returns the id of this IModelObject.
CoreModel
 Inheritedsecurity : Boolean = true
This property defined if the setCurrentVO method can accept the same vo in argument as the current one.
CoreModelObject
Public Methods
 MethodDefined By
  
QueueModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new QueueModelObject instance.
QueueModelObject
 Inherited
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
  
clear():void
[override] Removes all value objects in the model.
QueueModelObject
 Inherited
Returns and creates a new empty ModelObjectEvent.
CoreModelObject
  
Dequeues the head value object in the model.
QueueModelObject
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
  
enqueue(vo:ValueObject):Boolean
Enqueues a value object in the model.
QueueModelObject
 Inherited
Returns the current ValueObject selected in this model.
CoreModelObject
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
 Inherited
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
 Inherited
Returns the event name use in the setVO method.
CoreModelObject
 Inherited
Returns the event name use in the clear method.
CoreModelObject
  
Returns the event name use in the {
QueueModelObject
  
Returns the event name use in the {
QueueModelObject
  
Returns the internal Queue reference of this model.
QueueModelObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
  
[override] This method is invoked in the constructor of the class to initialize all events.
QueueModelObject
  
Initialize the internal Queue instance in the constructor of the class.
QueueModelObject
  
isEmpty():Boolean
Returns {
QueueModelObject
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
  
Returns the iterator of this model.
QueueModelObject
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
Notify a ModelObjectEvent before the current ValueObject selected in the model is changed.
CoreModelObject
 Inherited
Notify a ModelObjectEvent when a ValueObject change in the model.
CoreModelObject
 Inherited
Notify a ModelObjectEvent when the model is cleared.
CoreModelObject
  
Notify a ModelObjectEvent when a ValueObject is dequeue in the model.
QueueModelObject
  
Notify a ModelObjectEvent when a ValueObject is enqueue in the model.
QueueModelObject
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Run the first process with this model.
CoreModel
 Inherited
Sets the current ValueObject selected in this model.
CoreModelObject
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
 Inherited
setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method.
CoreModelObject
 Inherited
setEventTypeCLEAR(type:String):void
Returns the event name use in the clear method.
CoreModelObject
  
setEventTypeDEQUEUE(type:String):void
Sets the event name use in the dequeue method.
QueueModelObject
  
setEventTypeENQUEUE(type:String):void
Sets the event name use in the enqueue method.
QueueModelObject
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
  
setQueue(queue:Queue):void
Sets the internal Queue of this model.
QueueModelObject
  
size():Number
Returns the number of ValueObject in this model.
QueueModelObject
 Inherited
supports(value:*):Boolean
Returns true if the IValidator object validate the value.
CoreModelObject
  
toArray():Array
Returns the Array representation of this object.
QueueModelObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid.
CoreModelObject
 Inherited
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
Protected Methods
 MethodDefined By
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Public Constants
 ConstantDefined By
  DEQUEUE_VO : String = dequeueVO
[static] Default event type when the dequeue method is invoked.
QueueModelObject
  ENQUEUE_VO : String = enqueueVO
[static] Default event type when the enqueue method is invoked.
QueueModelObject
Constructor Detail
QueueModelObject()Constructor
public function QueueModelObject(global:Boolean = true, channel:String = null, id:* = null)

Creates a new QueueModelObject instance.

Parameters
global:Boolean (default = true) — the flag to use a global event flow or a local event flow (default true).
 
channel:String (default = null) — the name of the global event flow if the global argument is true.
 
id:* (default = null) — the id of this model.
Method Detail
clear()method
override public function clear():void

Removes all value objects in the model.

dequeue()method 
public function dequeue():*

Dequeues the head value object in the model.

Returns
*
enqueue()method 
public function enqueue(vo:ValueObject):Boolean

Enqueues a value object in the model.

Parameters

vo:ValueObject

Returns
Boolean
getEventTypeDEQUEUE()method 
public function getEventTypeDEQUEUE():String

Returns the event name use in the {

Returns
String — the event name use in the {
getEventTypeENQUEUE()method 
public function getEventTypeENQUEUE():String

Returns the event name use in the {

Returns
String — the event name use in the {
getQueue()method 
public function getQueue():Queue

Returns the internal Queue reference of this model.

Returns
Queue — the internal Queue reference of this model.
initEventType()method 
override public function initEventType():void

This method is invoked in the constructor of the class to initialize all events. Overrides this method.

initializeQueue()method 
public function initializeQueue():Queue

Initialize the internal Queue instance in the constructor of the class. You can overrides this method if you want change the default LinearQueue use in this model.

Returns
Queue
isEmpty()method 
public function isEmpty():Boolean

Returns {

Returns
Boolean — {
iterator()method 
public function iterator():Iterator

Returns the iterator of this model.

Returns
Iterator — the iterator of this model.
notifyDequeue()method 
public function notifyDequeue(vo:ValueObject):void

Notify a ModelObjectEvent when a ValueObject is dequeue in the model.

Parameters

vo:ValueObject

notifyEnqueue()method 
public function notifyEnqueue(vo:ValueObject):void

Notify a ModelObjectEvent when a ValueObject is enqueue in the model.

Parameters

vo:ValueObject

setEventTypeDEQUEUE()method 
public function setEventTypeDEQUEUE(type:String):void

Sets the event name use in the dequeue method.

Parameters

type:String

setEventTypeENQUEUE()method 
public function setEventTypeENQUEUE(type:String):void

Sets the event name use in the enqueue method.

Parameters

type:String

setQueue()method 
public function setQueue(queue:Queue):void

Sets the internal Queue of this model. By default the initializeQueue() method is used if the passed-in argument is null.

Parameters

queue:Queue

size()method 
public function size():Number

Returns the number of ValueObject in this model.

Returns
Number — the number of ValueObject in this model.
toArray()method 
public function toArray():Array

Returns the Array representation of this object.

Returns
Array — the Array representation of this object.
Constant Detail
DEQUEUE_VOConstant
public static const DEQUEUE_VO:String = dequeueVO

Default event type when the dequeue method is invoked.

ENQUEUE_VOConstant 
public static const ENQUEUE_VO:String = enqueueVO

Default event type when the enqueue method is invoked.