more usable commandline parser API
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / commandline / parameterparser / Parameter.java
index 831806d..22cc927 100755 (executable)
@@ -18,7 +18,7 @@ public class Parameter {
        /**
         * Indicates that at least one argument is mandatory for this parameter.
         */
-       private boolean mandatory;
+       protected boolean mandatory;
 
        private final Argument argumentType;
 
@@ -124,13 +124,6 @@ public class Parameter {
                return new File(arguments.get(0));
        }
 
-       public int getArgumentAsInteger() {
-               if (arguments.size() != 1)
-                       throw new RuntimeException("Parameter " + description
-                                       + " shall have exactly 1 argument.");
-               return Integer.parseInt(arguments.get(0));
-       }
-
        public List<File> getArgumentsAsFiles() {
                final ArrayList<File> result = new ArrayList<File>();