Updated copyright. Compatibility fixes for latest svjatoslav-commons.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / encoder / BitrateParameter.java
index 30a6712..ad4a9f0 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
- * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright (C) 2012 -- 2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
@@ -12,7 +12,7 @@ package eu.svjatoslav.meviz.encoder;
 import eu.svjatoslav.commons.commandline.parameterparser.ArgumentCount;
 import eu.svjatoslav.commons.commandline.parameterparser.Parameter;
 
-public class BitrateParameter extends Parameter<BitrateParameter> {
+public class BitrateParameter extends Parameter<BitrateParameter.Bitrate, BitrateParameter> {
 
     public BitrateParameter(final String description) {
         super(description, ArgumentCount.SINGLE);
@@ -24,14 +24,14 @@ public class BitrateParameter extends Parameter<BitrateParameter> {
     }
 
     @Override
-    public bitrate getValue() {
-        return bitrate.valueOf(arguments.get(0).toUpperCase());
+    public Bitrate getValue() {
+        return Bitrate.valueOf(arguments.get(0).toUpperCase());
     }
 
     @Override
     public boolean validate(final String value) {
         try {
-            bitrate.valueOf(value.toUpperCase());
+            Bitrate.valueOf(value.toUpperCase());
         } catch (final IllegalArgumentException exception) {
             return false;
         }
@@ -39,7 +39,7 @@ public class BitrateParameter extends Parameter<BitrateParameter> {
         return true;
     }
 
-    public enum bitrate {
+    public enum Bitrate {
         NONE, LOW, MEDIUM, HIGH, COPY
     }
 }