Created
April 24, 2012 08:42
-
-
Save orbekk/2477982 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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