Skip to content

Instantly share code, notes, and snippets.

@chj3737
Last active March 20, 2018 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chj3737/3d7e595e0073380156948fa88a724fa6 to your computer and use it in GitHub Desktop.
Save chj3737/3d7e595e0073380156948fa88a724fa6 to your computer and use it in GitHub Desktop.
class Observable {
void notifyObservers(Object context);
void addObserver(Observer observer);
void removeObserver(Observer observer);
// ... count,
}
interface Observer {
void update(Observable obj, Object context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment