public class SourceDestArgument extends ArgumentImpl
cp command where a number of source can be specified with
exactly one destination specfied at the end.DEFAULT_CONSUME_REMAINING, DEFAULT_INITIAL_SEPARATOR, DEFAULT_SUBSEQUENT_SEPARATOR| Constructor and Description |
|---|
SourceDestArgument(Argument source,
Argument dest)
Creates a SourceDestArgument using defaults where possible.
|
SourceDestArgument(Argument source,
Argument dest,
char initialSeparator,
char subsequentSeparator,
java.lang.String consumeRemaining,
java.util.List defaultValues)
Creates a SourceDestArgument using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendUsage(java.lang.StringBuffer buffer,
java.util.Set helpSettings,
java.util.Comparator comp)
Appends usage information to the specified StringBuffer
|
boolean |
canProcess(WriteableCommandLine commandLine,
java.lang.String arg)
Indicates whether this Option will be able to process the particular
argument.
|
java.util.List |
helpLines(int depth,
java.util.Set helpSettings,
java.util.Comparator comp)
Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.
|
void |
validate(WriteableCommandLine commandLine,
Option option)
Checks that the supplied CommandLine is valid with respect to the
suppled option.
|
defaults, defaultValues, getConsumeRemaining, getDefaultValues, getDescription, getInitialSeparator, getMaximum, getMinimum, getPreferredName, getPrefixes, getSubsequentSeparator, getTriggers, getValidator, isRequired, process, processValues, stripBoundaryQuotes, validatecanProcess, checkPrefixes, equals, findOption, getId, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanProcess, findOption, getIdpublic SourceDestArgument(Argument source, Argument dest)
source - the variable size Argumentdest - the fixed size Argumentpublic SourceDestArgument(Argument source, Argument dest, char initialSeparator, char subsequentSeparator, java.lang.String consumeRemaining, java.util.List defaultValues)
source - the variable size Argumentdest - the fixed size ArgumentinitialSeparator - the inistial separator to usesubsequentSeparator - the subsequent separator to useconsumeRemaining - the token triggering consume remaining behaviourdefaultValues - the default values for the SourceDestArgumentpublic void appendUsage(java.lang.StringBuffer buffer, java.util.Set helpSettings, java.util.Comparator comp)
appendUsage in interface OptionappendUsage in class ArgumentImplbuffer - the buffer to append tohelpSettings - a set of display settings @see DisplaySettingcomp - a comparator used to sort the Optionspublic java.util.List helpLines(int depth, java.util.Set helpSettings, java.util.Comparator comp)
helpLines in interface OptionhelpLines in class ArgumentImpldepth - the initial indent depthhelpSettings - the HelpSettings that should be appliedcomp - a comparator used to sort options when applicable.HelpLine,
HelpFormatterpublic void validate(WriteableCommandLine commandLine, Option option) throws OptionException
validate in interface Argumentvalidate in class ArgumentImplcommandLine - the CommandLine to check.option - the option to evaluateOptionException - if the CommandLine is not valid.CommandLine.getValues(Option)public boolean canProcess(WriteableCommandLine commandLine, java.lang.String arg)
canProcess in interface OptioncanProcess in class ArgumentImplcommandLine - the CommandLine object to store defaults inarg - the argument to be tested