Instantly share code, notes, and snippets.

@Gazer /factory.java Secret
Created Dec 13, 2016

Embed
What would you like to do?
factory
public SoundMananger getSoundMananger() {
if (GeneralUtils.isSoundEnabled()) {
return new LoudSoundMananger();
} else {
return new SilentSoundManager();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment