org.jscience.util
Interface Changeable

All Known Implementing Classes:
AbstractChangeable, Unchangeable

public interface Changeable

This is a flag interface that defines the common add/remove listener methods for classes and interfaces that wish to indicate that they are sources of ChangeEvents.


Method Summary
 void addChangeListener(ChangeListener cl)
          Deprecated. use addChangeListener(cl, ChangeType.UNKNOWN)
 void addChangeListener(ChangeListener cl, ChangeType ct)
          Add a listener that will be informed of changes of a given type.
 boolean isUnchanging(ChangeType ct)
          

A particular ChangeType can never be raised by this Changeable.

 void removeChangeListener(ChangeListener cl)
          Deprecated. use removeChangeListener(cl, ChangeType.UNKNOWN)
 void removeChangeListener(ChangeListener cl, ChangeType ct)
          Remove a listener that was interested in a specific types of changes.
 

Method Detail

addChangeListener

void addChangeListener(ChangeListener cl)
Deprecated. use addChangeListener(cl, ChangeType.UNKNOWN)

Add a listener that will be informed of all changes.

Parameters:
cl - the ChangeListener to add

addChangeListener

void addChangeListener(ChangeListener cl,
                       ChangeType ct)
Add a listener that will be informed of changes of a given type.

Parameters:
cl - the ChangeListener
ct - the ChangeType it is to be informed of

removeChangeListener

void removeChangeListener(ChangeListener cl)
Deprecated. use removeChangeListener(cl, ChangeType.UNKNOWN)

Remove a listener that was interested in all types of changes.

Parameters:
cl - a ChangeListener to remove

removeChangeListener

void removeChangeListener(ChangeListener cl,
                          ChangeType ct)
Remove a listener that was interested in a specific types of changes.

Parameters:
cl - a ChangeListener to remove
ct - the ChangeType that it was interested in

isUnchanging

boolean isUnchanging(ChangeType ct)

A particular ChangeType can never be raised by this Changeable.

If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.

Parameters:
ct - the ChangeType to check
Returns:
true if ChangeEvents of this type are guaranteed to never be fired