All Implemented Interfaces:
Cloneable
, Comparable <Operand <?>>
, MatchCountAccessor
, Operand <String >
, ParsedArgsAccessor
, Synopsisable
, Term
, org.refcodes.exception.ExceptionAccessor<ArgsSyntaxException >
, org.refcodes.mixin.AliasAccessor
, org.refcodes.mixin.Clonable
, org.refcodes.mixin.DescriptionAccessor
, org.refcodes.mixin.Resetable
, org.refcodes.mixin.Schemable
, org.refcodes.mixin.TypeAccessor<String >
, org.refcodes.mixin.ValueAccessor<String >
An
Operand
(neither a short option nor a long option prepended nor
being a switch) being s
String
. An
Operand
stands by itself
and represents itself.
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.DescriptionAccessor
org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
Nested classes/interfaces inherited from interface org.refcodes.exception.ExceptionAccessor
org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<EXC extends Throwable ,B extends org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<EXC,B>>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<EXC extends Throwable >, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<EXC extends Throwable >
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object ,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object >, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object >
Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor
org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends Object ,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends Object >, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends Object >
Constructor Summary
Constructors
Instantiates a new {StringOperand Flag} with the alias being the
proerty's key and the value being the property's value.
Instantiates a new {StringOperand Flag} with the alias being the
proerty's key and the value being the property's value.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Creates the difference between the provided set and the provided subset.
Creates the difference between the provided set and the provided
List
s therein found argument arrays subset (as of
Operand.getParsedArgs()
).
Creates the difference between the provided set and the provided
List
s therein found argument arrays subset (as of
Operand.getParsedArgs()
).
Methods inherited from class org.refcodes.cli.AbstractOperand
approve , clone , compareTo , getAlias , getMatchCount , getParsedArgs , getType , getValue , parseArgs , reset , setParsedArgs , setValue , toSchema , toString , toSyntax
Methods inherited from interface org.refcodes.mixin.DescriptionAccessor
getDescription
Methods inherited from interface org.refcodes.mixin.ValueAccessor
getValueOr
Constructor Details
StringOperand
public StringOperand (org.refcodes.struct.Relation<String ,String > aProperty)
Instantiates a new {StringOperand Flag} with the alias being the
proerty's key and the value being the property's value.
Parameters:
aProperty
- The key (=alias) and the value for the operand.
StringOperand
Instantiates a new {StringOperand Flag} with the alias being the
proerty's key and the value being the property's value.
Parameters:
aProperty
- The key (=alias) and the value for the operand.
aConsumer
- The Consumer
being invoked in case this
StringOperand
participated in successfully parsing the
command line arguments.
StringOperand
Parameters:
aAlias
- The alias to be used for naming purposes.
aDescription
- The description to be used (without any line breaks).
StringOperand
Parameters:
aAlias
- The alias to be used for naming purposes.
aDescription
- The description to be used (without any line breaks).
aConsumer
- The Consumer
being invoked in case this
StringOperand
participated in successfully parsing the
command line arguments.
Method Details
getDescription
public String getDescription ()
Specified by:
getDescription
in interface org.refcodes.mixin.DescriptionAccessor
toArgsDiff
Creates the difference between the provided set and the provided
List
s therein found argument arrays subset (as of
Operand.getParsedArgs()
).
Parameters:
aArgs
- The set to be used for the diff operation.
aArgsSubset
- The subset to be used for the diff operation being the
lists containing the Operand
instances whose command line
arguments are to be diffed.
Returns:
The difference between the set and the subset.
toArgsDiff
Creates the difference between the provided set and the provided
List
s therein found argument arrays subset (as of
Operand.getParsedArgs()
).
Parameters:
aArgs
- The set to be used for the diff operation.
aArgsSubset
- The subset to be used for the diff operation being the
lists containing the Operand
instances whose command line
arguments are to be diffed.
Returns:
The difference between the set and the subset.
toArgsDiff
Creates the difference between the provided set and the provided subset.
Parameters:
aArgs
- The set to be used for the diff operation.
aArgsSubset
- The subset to be used for the diff operation.
Returns:
The difference between the set and the subset.
toParsedArgs
protected static String [] toParsedArgs (Operand <?>[]... aOperands)
Parameters:
aOperands
- The lists containing the Operand
instances whose
command line arguments are to be added to the result.
Returns:
All the command line arguments detected in the provided
Operand
s List
s.