Created
May 15, 2010 09:30
-
-
Save manuel/402114 to your computer and use it in GitHub Desktop.
This file contains 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
// mutually recursive listener and broadcaster types with | |
// f-bounded polymorphism | |
class ListenerType<L extends ListenerType<L, B>, B extends BroadcasterType<L, B>> { | |
} | |
class BroadcasterType<L extends ListenerType<L, B>, B extends BroadcasterType<L, B>> { | |
} | |
class Listener extends ListenerType<Listener, Broadcaster> { | |
} | |
class Broadcaster extends BroadcasterType<Listener, Broadcaster> { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment