public class IntegerOptionImpl extends AbstractOption<Integer>
org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V>, org.refcodes.mixin.ValueAccessor.ValueProperty<V>
org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
org.refcodes.mixin.TypeAccessor.TypeMutator, org.refcodes.mixin.TypeAccessor.TypeProperty
ArgsAccessor.ArgsMutator, ArgsAccessor.ArgsProperty
Constructor and Description |
---|
IntegerOptionImpl(String aShortOption,
String aLongOption,
String aOptionArgName,
String aDescription) |
Modifier and Type | Method and Description |
---|---|
protected Integer |
toValue(String aArg)
Double dispatch hook to be implemented by subclasses of the
AbstractOperand for converting a command line argument to the
required Operand 's type. |
getLongOption, getShortOption, parseArgs, setArgs, setValue, toState, toSyntax
compareTo, getArgs, getDescription, getParameterName, getType, getValue, reset, toString
parseSyntax
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getArgs, getParameterName, getValue
parseSyntax
compareTo
protected Integer toValue(String aArg) throws ParseArgsException
AbstractOperand
AbstractOperand
for converting a command line argument to the
required Operand
's type. In case conversion failed, then an
according exception is to be thrown.toValue
in class AbstractOperand<Integer>
aArg
- The command line argument to be converted to an instance of
the given type T.ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required type.Copyright © 2016. All rights reserved.