From 1b51ce467b45ef1506ea9d5122b84ed50334471b Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Tue, 6 Dec 2016 18:21:41 +0000 Subject: [PATCH] Simplified Engine enum. --- src/main/java/musicplayer/util/Engine.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/musicplayer/util/Engine.java b/src/main/java/musicplayer/util/Engine.java index e06b3be..389cf47 100644 --- a/src/main/java/musicplayer/util/Engine.java +++ b/src/main/java/musicplayer/util/Engine.java @@ -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 engineImplementation; private final String neededClass; - Engine(String engineName, Class engineImplementation, String neededClass) { - this.engineName = engineName; + Engine(Class 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(); } /**