mascoptLib.util
Class ObservableObject

java.lang.Object
  |
  +--mascoptLib.util.ObservableObject
Direct Known Subclasses:
MascoptObject

public class ObservableObject
extends Object

Observation mechanism (used internally).

Author:
Jean-Francois Lalande (Jean-Francois.Lalande@sophia.inria.fr)

Constructor Summary
ObservableObject()
          Construct an Observable with zero Observers.
 
Method Summary
 void addAddObserver(Observer o)
          Adds an observer for this object.
 void addRemoveObserver(Observer o)
          Adds an observer for this object.
 void addValueObserver(Observer o)
          Adds an observer for this object.
 int countAddObservers()
          Returns the number of addObservers of this Observable object.
 int countRemoveObservers()
          Returns the number of removeObservers of this Observable object.
 int countValueObservers()
          Returns the number of valueObservers of this Observable object.
 void deleteAddObserver()
          Clears the observer list so that this object no longer has any addObservers.
 void deleteAddObserver(Observer o)
          Deletes an observer for this object.
 void deleteRemoveObserver()
          Clears the observer list so that this object no longer has any removeObservers.
 void deleteRemoveObserver(Observer o)
          Deletes an observer for this object.
 void deleteValueObserver()
          Clears the observer list so that this object no longer has any valueObservers.
 void deleteValueObserver(Observer o)
          Deletes an observer for this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservableObject

public ObservableObject()
Construct an Observable with zero Observers.

Method Detail

addAddObserver

public void addAddObserver(Observer o)
Adds an observer for this object. The notifications will be delivered to multiple addObservers in a FIFO order.

Parameters:
o - an observer to be added.

deleteAddObserver

public void deleteAddObserver(Observer o)
Deletes an observer for this object.

Parameters:
o - the observer to be deleted.

deleteAddObserver

public void deleteAddObserver()
Clears the observer list so that this object no longer has any addObservers.


countAddObservers

public int countAddObservers()
Returns the number of addObservers of this Observable object.

Returns:
the number of addObservers of this object.

addRemoveObserver

public void addRemoveObserver(Observer o)
Adds an observer for this object. The notifications will be delivered to multiple addObservers in a FIFO order.

Parameters:
o - an observer to be added.

deleteRemoveObserver

public void deleteRemoveObserver(Observer o)
Deletes an observer for this object.

Parameters:
o - the observer to be deleted.

deleteRemoveObserver

public void deleteRemoveObserver()
Clears the observer list so that this object no longer has any removeObservers.


countRemoveObservers

public int countRemoveObservers()
Returns the number of removeObservers of this Observable object.

Returns:
the number of removeObservers of this object.

addValueObserver

public void addValueObserver(Observer o)
Adds an observer for this object. The notifications will be delivered to multiple valueObservers in a FIFO order.

Parameters:
o - an observer to be added.

deleteValueObserver

public void deleteValueObserver(Observer o)
Deletes an observer for this object.

Parameters:
o - the observer to be deleted.

deleteValueObserver

public void deleteValueObserver()
Clears the observer list so that this object no longer has any valueObservers.


countValueObservers

public int countValueObservers()
Returns the number of valueObservers of this Observable object.

Returns:
the number of valueObservers of this object.