From cc556edc003e4fb8df13611167fab0d9fd3890f9 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 28 May 2010 11:47:51 +0000
Subject: [PATCH] Synchronize SDK on java.net with internal repository.
---
opendj-sdk/sdk/src/com/sun/opends/sdk/tools/BooleanArgument.java | 92 +++++++++++++++++++++++-----------------------
1 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/opendj-sdk/sdk/src/com/sun/opends/sdk/tools/BooleanArgument.java b/opendj-sdk/sdk/src/com/sun/opends/sdk/tools/BooleanArgument.java
index de6d27f..a3a6f6e 100644
--- a/opendj-sdk/sdk/src/com/sun/opends/sdk/tools/BooleanArgument.java
+++ b/opendj-sdk/sdk/src/com/sun/opends/sdk/tools/BooleanArgument.java
@@ -28,20 +28,19 @@
-import static com.sun.opends.sdk.messages.Messages.*;
+import static com.sun.opends.sdk.messages.Messages.ERR_BOOLEANARG_NO_VALUE_ALLOWED;
import org.opends.sdk.LocalizableMessage;
import org.opends.sdk.LocalizableMessageBuilder;
-
/**
- * This class defines an argument type that will be used to represent
- * Boolean values. These arguments will never take values from the
- * command line but and will never be required. If the argument is
- * provided, then it will be considered true, and if not then it will be
- * considered false. As such, the default value will always be "false".
+ * This class defines an argument type that will be used to represent Boolean
+ * values. These arguments will never take values from the command line but and
+ * will never be required. If the argument is provided, then it will be
+ * considered true, and if not then it will be considered false. As such, the
+ * default value will always be "false".
*/
final class BooleanArgument extends Argument
{
@@ -49,53 +48,25 @@
* Creates a new Boolean argument with the provided information.
*
* @param name
- * The generic name that should be used to refer to this
- * argument.
+ * The generic name that should be used to refer to this argument.
* @param shortIdentifier
* The single-character identifier for this argument, or
* <CODE>null</CODE> if there is none.
* @param longIdentifier
- * The long identifier for this argument, or
- * <CODE>null</CODE> if there is none.
+ * The long identifier for this argument, or <CODE>null</CODE> if
+ * there is none.
* @param description
* LocalizableMessage for the description of this argument.
* @throws ArgumentException
- * If there is a problem with any of the parameters used to
- * create this argument.
+ * If there is a problem with any of the parameters used to create
+ * this argument.
*/
- public BooleanArgument(String name, Character shortIdentifier,
- String longIdentifier, LocalizableMessage description)
+ public BooleanArgument(final String name, final Character shortIdentifier,
+ final String longIdentifier, final LocalizableMessage description)
throws ArgumentException
{
- super(name, shortIdentifier, longIdentifier, false, false, false,
- null, String.valueOf(false), null, description);
- }
-
-
-
- /**
- * Indicates whether the provided value is acceptable for use in this
- * argument.
- *
- * @param valueString
- * The value for which to make the determination.
- * @param invalidReason
- * A buffer into which the invalid reason may be written if
- * the value is not acceptable.
- * @return <CODE>true</CODE> if the value is acceptable, or
- * <CODE>false</CODE> if it is not.
- */
- public boolean valueIsAcceptable(String valueString,
- LocalizableMessageBuilder invalidReason)
- {
- // This argument type should never have a value, so any value
- // provided will
- // be unacceptable.
-
- invalidReason
- .append(ERR_BOOLEANARG_NO_VALUE_ALLOWED.get(getName()));
-
- return false;
+ super(name, shortIdentifier, longIdentifier, false, false, false, null,
+ String.valueOf(false), null, description);
}
@@ -103,7 +74,8 @@
/**
* {@inheritDoc}
*/
- final public void addValue(String valueString)
+ @Override
+ final public void addValue(final String valueString)
{
if (valueString != null)
{
@@ -118,9 +90,37 @@
/**
* {@inheritDoc}
*/
- final public void setPresent(boolean isPresent)
+ @Override
+ final public void setPresent(final boolean isPresent)
{
addValue(String.valueOf(isPresent));
}
+
+
+ /**
+ * Indicates whether the provided value is acceptable for use in this
+ * argument.
+ *
+ * @param valueString
+ * The value for which to make the determination.
+ * @param invalidReason
+ * A buffer into which the invalid reason may be written if the value
+ * is not acceptable.
+ * @return <CODE>true</CODE> if the value is acceptable, or <CODE>false</CODE>
+ * if it is not.
+ */
+ @Override
+ public boolean valueIsAcceptable(final String valueString,
+ final LocalizableMessageBuilder invalidReason)
+ {
+ // This argument type should never have a value, so any value
+ // provided will
+ // be unacceptable.
+
+ invalidReason.append(ERR_BOOLEANARG_NO_VALUE_ALLOWED.get(getName()));
+
+ return false;
+ }
+
}
--
Gitblit v1.10.0