Skip to content

Instantly share code, notes, and snippets.

@orbekk
Created April 24, 2012 08:42
Show Gist options
  • Save orbekk/2477982 to your computer and use it in GitHub Desktop.
Save orbekk/2477982 to your computer and use it in GitHub Desktop.
class WithCallback {
Callback callback = null;
void done() {
callback.run();
}
protected abstract void run();
}
class Foo extends WithCallback {
@Override void run() {
done();
}
}
Foo foo = new Foo();
foo.callback = lol;
foo.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment