TYPE - the type of the data being passed around.public class DefaultListenable<TYPE> extends java.lang.Object implements Listenable<TYPE>
| Constructor and Description |
|---|
DefaultListenable() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Listener<TYPE> l)
Add listener for this observable
|
void |
notifyChange(TYPE data)
This should only be called by the owner of the listenable, not by
listeners or others.
|
void |
removeListener(Listener<TYPE> l)
Remove listener for this observable
|
public void addListener(Listener<TYPE> l)
ListenableaddListener in interface Listenable<TYPE>l - the listener to addpublic void removeListener(Listener<TYPE> l)
ListenableremoveListener in interface Listenable<TYPE>l - the listener to removepublic void notifyChange(TYPE data)
data - information about the change.