mascoptLib.util
Class ObservableSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
                    |
                    +--mascoptLib.util.ObservableSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set

public class ObservableSet
extends HashSet

Observation mechanism (used internally).

Author:
Jean-Francois Lalande (Jean-Francois.Lalande@sophia.inria.fr)
See Also:
Serialized Form

Constructor Summary
ObservableSet()
          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.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ObservableSet

public ObservableSet()
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.