Packagecom.addicted2flash.util
Classpublic class MicroObservable
ImplementsIMicroObservable
SubclassesPerformanceObservable

This class represents an observer-pattern-based implementation with only one value in the model. Setting the value will notify all observers.



Public Properties
 PropertyDefined by
  isAvailable : Boolean
[read-only] Returns true if the value is available.
MicroObservable
  microObserverAmount : int
[read-only] Returns the number of observers of this IMicroObservable.
MicroObservable
  value : *
Returns the value of this IMicroObserver.
MicroObservable
Protected Properties
 PropertyDefined by
  _hasChanged : Boolean
MicroObservable
  _observers : ISet
MicroObservable
  _ref : IMicroObservable
MicroObservable
  _value : *
MicroObservable
Public Methods
 MethodDefined by
  
Create a new MicroObservable.
MicroObservable
  
Adds an IMicroObserver to the set of observers for this object, provided that it is not the same as some observer already in the set
MicroObservable
  
dispose():void
free memory for garbage collection.
MicroObservable
  
Deletes an IMicroObserver from the set of observers of this object.
MicroObservable
  
Clears the observer list so that this object no longer has any observers.
MicroObservable
  
toString():String
String representation of MicroObservable.
MicroObservable
Protected Methods
 MethodDefined by
  
Each registered IMicroObserver will be notified.
MicroObservable
Property detail
_hasChangedproperty
protected var _hasChanged:Boolean
isAvailableproperty 
isAvailable:Boolean  [read-only]

Returns true if the value is available.

Implementation
    public function get isAvailable():Boolean
microObserverAmountproperty 
microObserverAmount:int  [read-only]

Returns the number of observers of this IMicroObservable.

Implementation
    public function get microObserverAmount():int
_observersproperty 
protected var _observers:ISet
_refproperty 
protected var _ref:IMicroObservable
_valueproperty 
protected var _value:*
valueproperty 
value:*  [read-write]

Returns the value of this IMicroObserver.

Implementation
    public function get value():*
    public function set value(value:*):void
Constructor detail
MicroObservable()constructor
public function MicroObservable(reference:IMicroObservable = null)

Create a new MicroObservable.

Parameters
reference:IMicroObservable (default = null) — (optional) the referenced target of notifications (useful for aggregation)
Method detail
addMicroObserver()method
public function addMicroObserver(o:IMicroObserver):void

Adds an IMicroObserver to the set of observers for this object, provided that it is not the same as some observer already in the set

Parameters
o:IMicroObserver — an IMicroObserver to be added.
dispose()method 
public function dispose():void

free memory for garbage collection.

notifyDataServiceObservers()method 
protected function notifyDataServiceObservers():void

Each registered IMicroObserver will be notified.

removeMicroObserver()method 
public function removeMicroObserver(o:IMicroObserver):void

Deletes an IMicroObserver from the set of observers of this object. Passing null to this method will have no effect.

Parameters
o:IMicroObserver — the IMicroObserver to be deleted.
removeMicroObservers()method 
public function removeMicroObservers():void

Clears the observer list so that this object no longer has any observers.

toString()method 
public function toString():String

String representation of MicroObservable.

Returns
String — String representation of MicroObservable