this.argumentCount = argumentCount;
}
+ @SuppressWarnings("unchecked")
public T addAliases(final String... aliasArray) {
// save aliases
}
/**
+ * @param argumentString
+ * argument to add
* @return <code>true</code> if no errors were found. <code>false</code>
* otherwise.
*/
// check if arguments are allowed for this parameter
if (argumentCount.equals(ArgumentCount.NONE)) {
System.out
- .println("Error! No arguments are allowed for parameters: "
- + getAliases());
+ .println("Error! No arguments are allowed for parameters: "
+ + getAliases());
return false;
}
if ((arguments.size() > 0)
&& (argumentCount.equals(ArgumentCount.SINGLE))) {
System.out
- .println("Error! Only single argument is allowed for parameters: "
- + getAliases());
+ .println("Error! Only single argument is allowed for parameters: "
+ + getAliases());
return false;
}
}
/**
+ * @param alias
+ * alias to check against
* @return <code>true</code> if given alias is registered for this
* parameter.
*/
return true;
}
+ @SuppressWarnings("unchecked")
public T setMandatory() {
mandatory = true;
return (T) this;
}
/**
+ * @param value
+ * value to validate
* @return <code>true</code> if value is correct, <code>false</code>
* otherwise.
*/