|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.util.args.Argument
org.opends.server.util.args.BooleanArgument
public class BooleanArgument
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".
Constructor Summary | |
---|---|
BooleanArgument(java.lang.String name,
java.lang.Character shortIdentifier,
java.lang.String longIdentifier,
Message description)
Creates a new Boolean argument with the provided information. |
Method Summary | |
---|---|
void |
addValue(java.lang.String valueString)
Adds a value to the set of values for this argument. |
void |
setPresent(boolean isPresent)
Specifies whether this argument is present in the parsed set of command-line arguments. |
boolean |
valueIsAcceptable(java.lang.String valueString,
MessageBuilder invalidReason)
Indicates whether the provided value is acceptable for use in this argument. |
Methods inherited from class org.opends.server.util.args.Argument |
---|
clearValues, getBooleanValue, getDefaultValue, getDescription, getIntValue, getIntValues, getLongIdentifier, getName, getPropertyName, getShortIdentifier, getValue, getValuePlaceholder, getValues, hasValue, isHidden, isMultiValued, isPresent, isRequired, isValueSetByProperty, needsValue, setDefaultValue, setHidden, setMultiValued, setNeedsValue, setPropertyName, setRequired, setValuePlaceholder, setValueSetByProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BooleanArgument(java.lang.String name, java.lang.Character shortIdentifier, java.lang.String longIdentifier, Message description) throws ArgumentException
name
- The generic name that should be used to refer to
this argument.shortIdentifier
- The single-character identifier for this
argument, or null
if there is none.longIdentifier
- The long identifier for this argument, or
null
if there is none.description
- Message for the description of this
argument.
ArgumentException
- If there is a problem with any of the
parameters used to create this argument.Method Detail |
---|
public boolean valueIsAcceptable(java.lang.String valueString, MessageBuilder invalidReason)
valueIsAcceptable
in class Argument
valueString
- The value for which to make the determination.invalidReason
- A buffer into which the invalid reason may be
written if the value is not acceptable.
true
if the value is acceptable, or
false
if it is not.public final void addValue(java.lang.String valueString)
valueIsAcceptable
method.
addValue
in class Argument
valueString
- The string representation of the value to add to this
argument.public final void setPresent(boolean isPresent)
setPresent
in class Argument
isPresent
- Indicates whether this argument is present in the set of
command-line arguments.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |