| Package | vegas.models.maps |
| Class | public class MapModelObject |
| Inheritance | MapModelObject CoreModelObject CoreModel CoreEventDispatcher Object |
| Implements | Iterable |
| Subclasses | IndexedMapModelObject, OrderedMapModelObject |
Map to register value objects with a specific key.
| Property | Defined By | ||
|---|---|---|---|
| _map : Map
The internal map of this model. | MapModelObject | ||
| _sAddType : String
The internal ModelObjectEvent type use in the addVO method. | MapModelObject | ||
| _sRemoveType : String
The internal ModelObjectEvent type use in the removeVO method. | MapModelObject | ||
| _sUpdateType : String
The internal ModelObjectEvent type when the update event type is use. | MapModelObject | ||
| Method | Defined By | ||
|---|---|---|---|
MapModelObject(global:Boolean = true, channel:String = null, factory:Map = null, id:* = null)
Creates a new MapModelObject instance. | MapModelObject | ||
![]() | 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 | |
addVO(vo:ValueObject):void
Inserts a value object in the model. | MapModelObject | ||
clear():void [override]
Removes all value objects in the model. | MapModelObject | ||
contains(vo:ValueObject):Boolean
Returns true if the model contains the specified ValueObject. | MapModelObject | ||
containsByID(id:*):Boolean
Returns true if the model contains the specified id key in argument. | MapModelObject | ||
containsByProperty(propName:String, value:*):Boolean
Returns true if the model contains the specified attribute value. | MapModelObject | ||
![]() |
Returns and creates a new empty ModelObjectEvent. | CoreModelObject | |
![]() | dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | CoreEventDispatcher | |
![]() |
Returns the current ValueObject selected in this model. | CoreModelObject | |
![]() |
Returns the internal system.events.EventDispatcher reference. | CoreEventDispatcher | |
getEventTypeADD():String
Returns the event name use in the addVO method. | MapModelObject | ||
![]() | getEventTypeBEFORE_CHANGE():String
Returns the event name use in the setCurrentVO method before is changed. | CoreModelObject | |
![]() | getEventTypeCHANGE():String
Returns the event name use in the setVO method. | CoreModelObject | |
![]() | getEventTypeCLEAR():String
Returns the event name use in the clear method. | CoreModelObject | |
getEventTypeREMOVE():String
Returns the event name use in the removeVO method. | MapModelObject | ||
getEventTypeUPDATE():String
Returns the event name use in the updateVO method. | MapModelObject | ||
Returns the internal map of this model. | MapModelObject | ||
getVO(id:*):ValueObject
Returns the ValueObject defined by the id passed in argument. | MapModelObject | ||
getVOByProperty(propName:String, value:*):ValueObject
Returns a ValueObject if the model contains a ValueObject with the specified member. | MapModelObject | ||
![]() | hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | CoreEventDispatcher | |
initEventType():void [override]
This method is invoked in the constructor of the class to initialize all events. | MapModelObject | ||
Initialize the internal Map instance in the constructor of the class. | MapModelObject | ||
isEmpty():Boolean
Returns true if the model is empty. | MapModelObject | ||
![]() | isGlobal():Boolean
Indicates if the dispatcher use a global event flow. | CoreEventDispatcher | |
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreEventDispatcher | |
Returns the iterator of this model. | MapModelObject | ||
![]() | lock():void
Locks the object. | CoreEventDispatcher | |
notifyAdd(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is inserted in the model. | MapModelObject | ||
![]() | notifyBeforeChange(vo:ValueObject):void
Notify a ModelObjectEvent before the current ValueObject selected in the model is changed. | CoreModelObject | |
![]() | notifyChange(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject change in the model. | CoreModelObject | |
![]() | notifyClear():void
Notify a ModelObjectEvent when the model is cleared. | CoreModelObject | |
notifyRemove(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is removed in the model. | MapModelObject | ||
notifyUpdate(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is updated in the model. | MapModelObject | ||
![]() | 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 | |
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object. | CoreEventDispatcher | |
removeVO(vo:ValueObject):void
Removes a value object in the model. | MapModelObject | ||
![]() | run(... arguments):void
Run the first process with this model. | CoreModel | |
![]() | setCurrentVO(vo:ValueObject):void
Sets the current ValueObject selected in this model. | CoreModelObject | |
![]() | setEventDispatcher(dispatcher:EventDispatcher):void
Sets the internal EventDispatcher reference. | CoreEventDispatcher | |
setEventTypeADD(type:String):void
Sets the event name use in the addVO method. | MapModelObject | ||
![]() | setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed. | CoreModelObject | |
![]() | setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method. | CoreModelObject | |
![]() | setEventTypeCLEAR(type:String):void
Returns the event name use in the clear method. | CoreModelObject | |
setEventTypeREMOVE(type:String):void
Sets the event name use in the removeVO method. | MapModelObject | ||
setEventTypeUPDATE(type:String):void
Sets the event name use in the addVO method. | MapModelObject | ||
![]() | 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 | |
Sets the internal map of this model. | MapModelObject | ||
size():Number
Returns the number of ValueObject in this model. | MapModelObject | ||
![]() | supports(value:*):Boolean
Returns true if the IValidator object validate the value. | CoreModelObject | |
![]() | unlock():void
Unlocks the display. | CoreEventDispatcher | |
![]() | unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object. | CoreEventDispatcher | |
updateVO(vo:ValueObject):void
Update a value object in the model. | MapModelObject | ||
![]() | validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid. | CoreModelObject | |
![]() | 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 | |
| _map | property |
protected var _map:MapThe internal map of this model.
| _sAddType | property |
protected var _sAddType:StringThe internal ModelObjectEvent type use in the addVO method.
| _sRemoveType | property |
protected var _sRemoveType:StringThe internal ModelObjectEvent type use in the removeVO method.
| _sUpdateType | property |
protected var _sUpdateType:StringThe internal ModelObjectEvent type when the update event type is use.
| MapModelObject | () | Constructor |
public function MapModelObject(global:Boolean = true, channel:String = null, factory:Map = null, id:* = null)Creates a new MapModelObject instance.
Parametersglobal:Boolean (default = true) — the flag to use a global event flow or a local event flow (default true).
| |
channel:String (default = null) — (optional) the name of the global event flow if the global argument is true.
| |
factory:Map (default = null) — (optional) the Map factory reference used in the model to register all entries.
| |
id:* (default = null) — the id of this model.
|
| addVO | () | method |
public function addVO(vo:ValueObject):voidInserts a value object in the model.
Parameters
vo:ValueObject |
ArgumentError — if the argument of this method is 'null' or 'undefined'.
| |
ArgumentError — if the ValueObject passed in argument is already register in the model.
|
| clear | () | method |
override public function clear():voidRemoves all value objects in the model.
| contains | () | method |
public function contains(vo:ValueObject):Boolean
Returns true if the model contains the specified ValueObject.
Parameters
vo:ValueObject |
Boolean — true if the model contains the specified ValueObject.
|
| containsByID | () | method |
public function containsByID(id:*):Boolean
Returns true if the model contains the specified id key in argument.
Parameters
id:* |
Boolean — true if the model contains the specified id key in argument
|
| containsByProperty | () | method |
public function containsByProperty(propName:String, value:*):Boolean
Returns true if the model contains the specified attribute value.
Parameters
propName:String | |
value:* |
Boolean — true if the model contains the specified id key in argument
|
| getEventTypeADD | () | method |
public function getEventTypeADD():String
Returns the event name use in the addVO method.
String — the event name use in the addVO method.
|
| getEventTypeREMOVE | () | method |
public function getEventTypeREMOVE():String
Returns the event name use in the removeVO method.
String — the event name use in the removeVO method.
|
| getEventTypeUPDATE | () | method |
public function getEventTypeUPDATE():String
Returns the event name use in the updateVO method.
String — the event name use in the updateVO method.
|
| getMap | () | method |
public function getMap():MapReturns the internal map of this model.
ReturnsMap — the internal map of this model.
|
| getVO | () | method |
public function getVO(id:*):ValueObjectReturns the ValueObject defined by the id passed in argument.
Parameters
id:* |
ValueObject — the ValueObject defined by the id passed in argument.
|
| getVOByProperty | () | method |
public function getVOByProperty(propName:String, value:*):ValueObject
Returns a ValueObject if the model contains a ValueObject with the specified member.
Parameters
propName:String | |
value:* |
ValueObject — a ValueObject if the model contains a ValueObject with the specified member.
|
| initEventType | () | method |
override public function initEventType():voidThis method is invoked in the constructor of the class to initialize all events. Overrides this method.
| initializeMap | () | method |
public function initializeMap():MapInitialize the internal Map instance in the constructor of the class. You can overrides this method if you want change the default HashMap use in this model.
ReturnsMap |
| isEmpty | () | method |
public function isEmpty():Boolean
Returns true if the model is empty.
Boolean — true if the model is empty.
|
| iterator | () | method |
public function iterator():IteratorReturns the iterator of this model.
ReturnsIterator — the iterator of this model.
|
| notifyAdd | () | method |
public function notifyAdd(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is inserted in the model.
Parameters
vo:ValueObject |
| notifyRemove | () | method |
public function notifyRemove(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is removed in the model.
Parameters
vo:ValueObject |
| notifyUpdate | () | method |
public function notifyUpdate(vo:ValueObject):void
Notify a ModelObjectEvent when a ValueObject is updated in the model.
Parameters
vo:ValueObject |
| removeVO | () | method |
public function removeVO(vo:ValueObject):voidRemoves a value object in the model.
Parameters
vo:ValueObject |
| setEventTypeADD | () | method |
public function setEventTypeADD(type:String):void
Sets the event name use in the addVO method.
Parameters
type:String |
| setEventTypeREMOVE | () | method |
public function setEventTypeREMOVE(type:String):void
Sets the event name use in the removeVO method.
Parameters
type:String |
| setEventTypeUPDATE | () | method |
public function setEventTypeUPDATE(type:String):void
Sets the event name use in the addVO method.
Parameters
type:String |
| setMap | () | method |
public function setMap(m:Map):voidSets the internal map of this model. By default the 'initializeMap' method is used if the passed-in argument is null.
Parameters
m:Map |
| size | () | method |
public function size():Number
Returns the number of ValueObject in this model.
Number — the number of ValueObject in this model.
|
| updateVO | () | method |
public function updateVO(vo:ValueObject):voidUpdate a value object in the model.
Parameters
vo:ValueObject |
ArgumentError — if the value object passed-in argument don't exist.
|