Added special commandline argument type to support multiple strings.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / commandline / parameterparser / parameter / DirectoryParameter.java
index 35ab439..fc03263 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Svjatoslav Commons - shared library of common functionality.
  * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
  * or later as published by the Free Software Foundation.
@@ -24,7 +24,7 @@ public class DirectoryParameter extends Parameter {
 
        @Override
        public DirectoryParameter addAliases(final String... aliasArray) {
-               super.addAliases(aliasArray);
+               super.addAliasesProtected(aliasArray);
                return this;
        }
 
@@ -33,6 +33,7 @@ public class DirectoryParameter extends Parameter {
                return existanceType.description + "directory";
        }
 
+       @Override
        public File getValue() {
 
                if (arguments.size() != 1)
@@ -54,7 +55,7 @@ public class DirectoryParameter extends Parameter {
 
        @Override
        public DirectoryParameter setMandatory() {
-               mandatory = true;
+               setMandatoryProtected();
                return this;
        }