Remove unused final modifiers
This commit is contained in:
parent
c4db9f43fb
commit
f7876dc964
@ -120,7 +120,7 @@ public final class ParametrizedCommandData {
|
|||||||
* @param flag the boolean flag
|
* @param flag the boolean flag
|
||||||
* @throws InvalidParameterException if the parameter is already defined as a
|
* @throws InvalidParameterException if the parameter is already defined as a
|
||||||
* string parameter */
|
* string parameter */
|
||||||
public final void addBooleanParameter(final String flag)
|
public void addBooleanParameter(final String flag)
|
||||||
throws InvalidParameterException {
|
throws InvalidParameterException {
|
||||||
if (params.containsKey(flag) && stringParams.containsKey(flag)) {
|
if (params.containsKey(flag) && stringParams.containsKey(flag)) {
|
||||||
throw new InvalidParameterException("Parameter is already defined as string"); //$NON-NLS-1$
|
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
|
* @param needed if the parameter's absence should cause an exception
|
||||||
* @throws InvalidParameterException if the parameter is already defined as a
|
* @throws InvalidParameterException if the parameter is already defined as a
|
||||||
* boolean parameter */
|
* boolean parameter */
|
||||||
public final void addStringParameter(final String flag, final boolean needed)
|
public void addStringParameter(final String flag, final boolean needed)
|
||||||
throws InvalidParameterException {
|
throws InvalidParameterException {
|
||||||
if (params.containsKey(flag)) {
|
if (params.containsKey(flag)) {
|
||||||
checkParam(flag, needed);
|
checkParam(flag, needed);
|
||||||
@ -165,14 +165,14 @@ public final class ParametrizedCommandData {
|
|||||||
/** Retrieve the boolean parameters (aka flags).
|
/** Retrieve the boolean parameters (aka flags).
|
||||||
*
|
*
|
||||||
* @return the set of boolean parameters */
|
* @return the set of boolean parameters */
|
||||||
public final Set<String> getBooleanParameters() {
|
public Set<String> getBooleanParameters() {
|
||||||
return Collections.unmodifiableSet(boolParams);
|
return Collections.unmodifiableSet(boolParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Retrieve the parameter names.
|
/** Retrieve the parameter names.
|
||||||
*
|
*
|
||||||
* @return the stringParams */
|
* @return the stringParams */
|
||||||
public final Set<String> getParameters() {
|
public Set<String> getParameters() {
|
||||||
return params.keySet();
|
return params.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ public final class ParametrizedCommandData {
|
|||||||
* @param args the command arguments
|
* @param args the command arguments
|
||||||
* @return the command object
|
* @return the command object
|
||||||
* @throws IOException if the command could not be filled. */
|
* @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 String... args) throws IOException {
|
||||||
final CommandParameters parameters = new CommandParameters(boolParams,
|
final CommandParameters parameters = new CommandParameters(boolParams,
|
||||||
stringParams.keySet(), strict);
|
stringParams.keySet(), strict);
|
||||||
@ -209,7 +209,7 @@ public final class ParametrizedCommandData {
|
|||||||
/** Get the string parameters names.
|
/** Get the string parameters names.
|
||||||
*
|
*
|
||||||
* @return the stringParams */
|
* @return the stringParams */
|
||||||
public final Set<String> getStringParameters() {
|
public Set<String> getStringParameters() {
|
||||||
return stringParams.keySet();
|
return stringParams.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,14 +217,14 @@ public final class ParametrizedCommandData {
|
|||||||
*
|
*
|
||||||
* @param param the parameter name
|
* @param param the parameter name
|
||||||
* @return if the parameter is needed */
|
* @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();
|
return params.containsKey(param) && params.get(param).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** If the command refuse unrecognized parameters.
|
/** If the command refuse unrecognized parameters.
|
||||||
*
|
*
|
||||||
* @return the strict */
|
* @return the strict */
|
||||||
public final boolean isStrict() {
|
public boolean isStrict() {
|
||||||
return strict;
|
return strict;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ public final class ParametrizedCommandData {
|
|||||||
* @param parameters the parameter list to complete
|
* @param parameters the parameter list to complete
|
||||||
* @param toProvide the parameters to ask for
|
* @param toProvide the parameters to ask for
|
||||||
* @throws IOException if the manager was closed */
|
* @throws IOException if the manager was closed */
|
||||||
private final static void fillParameters(final ConsoleInput input,
|
private static void fillParameters(final ConsoleInput input,
|
||||||
final List<String> toProvide, final CommandParameters parameters)
|
final List<String> toProvide, final CommandParameters parameters)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
for (final String string : toProvide) {
|
for (final String string : toProvide) {
|
||||||
|
Loading…
Reference in New Issue
Block a user