Created
December 6, 2014 21:06
-
-
Save maxov/1ebfd29f226fac4ab0cf to your computer and use it in GitHub Desktop.
Tada
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
interface Registries extends Registry<String, Registry> { | |
void addChild(Registries child); | |
} | |
interface Registry<K, V> { | |
Set<V> getValues(); | |
Optional<V> get(K key); | |
} | |
interface HorseTypeRegistry extends Registry<String, HorseType> { | |
} | |
class GameRegistries extends Registries { | |
GameRegistries() { | |
} | |
} | |
class EntityRegistries extends Registries { | |
EntityRegistries() { | |
addChild(new GameRegistries); | |
add(new HorseTypeRegistry); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment