| Package | andromeda.util.observer |
| Class | public class Observable |
| Inheritance | Observable CoreObject |
| Method | Defined by | ||
|---|---|---|---|
|
Creates an Observable instance with zero Observers.
| Observable | ||
|
addObserver(o:Observer):Boolean
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
| Observable | ||
|
clearChanged():void
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
| Observable | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
|
hasChanged():Boolean
Tests if this object has changed.
| Observable | ||
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
notifyObservers(arg:*):void
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
| Observable | ||
|
removeObservers(o:Observer):void
Removes an observer from the set of observers of this object.
| Observable | ||
|
setChanged():void
Marks this Observable object as having been changed; the hasChanged method will now return true
| Observable | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
size():Number
Returns the number of observers of this Observable object.
| Observable | ||
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
| Observable | () | constructor |
public function Observable()Creates an Observable instance with zero Observers.
| addObserver | () | method |
public function addObserver(o:Observer):BooleanAdds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
Parameterso:Observer |
Boolean |
| clearChanged | () | method |
public function clearChanged():voidIndicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
| hasChanged | () | method |
public function hasChanged():BooleanTests if this object has changed.
ReturnsBoolean |
| notifyObservers | () | method |
public function notifyObservers(arg:*):voidIf this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
Parametersarg:* |
| removeObservers | () | method |
public function removeObservers(o:Observer):voidRemoves an observer from the set of observers of this object.
Parameterso:Observer |
| setChanged | () | method |
public function setChanged():voidMarks this Observable object as having been changed; the hasChanged method will now return true
| size | () | method |
public function size():NumberReturns the number of observers of this Observable object.
ReturnsNumber — the number of observers of this Observable object.
|