diff --git a/gclc/src/main/java/net/bigeon/gclc/command/ParametrizedCommandData.java b/gclc/src/main/java/net/bigeon/gclc/command/ParametrizedCommandData.java index ca1e574..11b56f9 100644 --- a/gclc/src/main/java/net/bigeon/gclc/command/ParametrizedCommandData.java +++ b/gclc/src/main/java/net/bigeon/gclc/command/ParametrizedCommandData.java @@ -120,7 +120,7 @@ public final class ParametrizedCommandData { * @param flag the boolean flag * @throws InvalidParameterException if the parameter is already defined as a * string parameter */ - public final void addBooleanParameter(final String flag) + public void addBooleanParameter(final String flag) throws InvalidParameterException { if (params.containsKey(flag) && stringParams.containsKey(flag)) { throw new InvalidParameterException("Parameter is already defined as string"); //$NON-NLS-1$ @@ -135,7 +135,7 @@ public final class ParametrizedCommandData { * @param needed if the parameter's absence should cause an exception * @throws InvalidParameterException if the parameter is already defined as a * boolean parameter */ - public final void addStringParameter(final String flag, final boolean needed) + public void addStringParameter(final String flag, final boolean needed) throws InvalidParameterException { if (params.containsKey(flag)) { checkParam(flag, needed); @@ -165,14 +165,14 @@ public final class ParametrizedCommandData { /** Retrieve the boolean parameters (aka flags). * * @return the set of boolean parameters */ - public final Set getBooleanParameters() { + public Set getBooleanParameters() { return Collections.unmodifiableSet(boolParams); } /** Retrieve the parameter names. * * @return the stringParams */ - public final Set getParameters() { + public Set getParameters() { return params.keySet(); } @@ -182,7 +182,7 @@ public final class ParametrizedCommandData { * @param args the command arguments * @return the command object * @throws IOException if the command could not be filled. */ - public final CommandParameters getParameters(final ConsoleInput input, + public CommandParameters getParameters(final ConsoleInput input, final String... args) throws IOException { final CommandParameters parameters = new CommandParameters(boolParams, stringParams.keySet(), strict); @@ -209,7 +209,7 @@ public final class ParametrizedCommandData { /** Get the string parameters names. * * @return the stringParams */ - public final Set getStringParameters() { + public Set getStringParameters() { return stringParams.keySet(); } @@ -217,14 +217,14 @@ public final class ParametrizedCommandData { * * @param param the parameter name * @return if the parameter is needed */ - public final boolean isNeeded(final String param) { + public boolean isNeeded(final String param) { return params.containsKey(param) && params.get(param).booleanValue(); } /** If the command refuse unrecognized parameters. * * @return the strict */ - public final boolean isStrict() { + public boolean isStrict() { return strict; } @@ -236,7 +236,7 @@ public final class ParametrizedCommandData { * @param parameters the parameter list to complete * @param toProvide the parameters to ask for * @throws IOException if the manager was closed */ - private final static void fillParameters(final ConsoleInput input, + private static void fillParameters(final ConsoleInput input, final List toProvide, final CommandParameters parameters) throws IOException { for (final String string : toProvide) {