Simplified Engine enum.

This commit is contained in:
neviyn 2016-12-06 18:21:41 +00:00
parent a98ef2209e
commit 1b51ce467b

View File

@ -9,15 +9,13 @@ import musicplayer.player.VLCPlayer;
*/
public enum Engine {
GSTREAMER("GStreamer", GStreamerPlayer.class, "org.gstreamer.elements.PlayBin2"),
VLC("VLC", VLCPlayer.class, "uk.co.caprica.vlcj.player.MediaPlayer");
GSTREAMER(GStreamerPlayer.class, "org.gstreamer.elements.PlayBin2"),
VLC(VLCPlayer.class, "uk.co.caprica.vlcj.player.MediaPlayer");
private final String engineName;
private final Class<? extends IPlayer> engineImplementation;
private final String neededClass;
Engine(String engineName, Class<? extends IPlayer> engineImplementation, String neededClass) {
this.engineName = engineName;
Engine(Class<? extends IPlayer> engineImplementation, String neededClass) {
this.engineImplementation = engineImplementation;
this.neededClass = neededClass;
}
@ -26,7 +24,7 @@ public enum Engine {
* @return Name of the engine.
*/
public String getEngineName() {
return engineName;
return this.toString();
}
/**