Class StringOperand

All Implemented Interfaces:
Cloneable, Comparable<Operand<?>>, ArgsAccessor, Constituent, Operand<String>, Synopsisable, 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>

public class StringOperand extends AbstractOperand<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.cli.ArgsAccessor

    ArgsAccessor.ArgsMutator, ArgsAccessor.ArgsProperty

    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.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>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     

    Fields inherited from class org.refcodes.cli.AbstractOperand

    _value
  • Constructor Summary

    Constructors
    Constructor
    Description
    StringOperand(String aAlias, String aDescription)
    Instantiates a new StringOperand.
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    toType(String aArg)
    To value.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.cli.Constituent

    parseArgs, toSynopsis, toSyntax, toSyntax, toSyntax, toSyntax

    Methods inherited from interface org.refcodes.mixin.DescriptionAccessor

    getDescription

    Methods inherited from interface org.refcodes.cli.Operand

    hasValue, toSpec, toValue

    Methods inherited from interface org.refcodes.cli.Synopsisable

    toSynopsis, toSynopsis, toSynopsis, toSynopsis

    Methods inherited from interface org.refcodes.mixin.ValueAccessor

    getValueOr
  • Field Details

    • _description

      protected String _description
  • Constructor Details

    • StringOperand

      public StringOperand(String aAlias, String aDescription)
      Instantiates a new StringOperand.
      Parameters:
      aAlias - The alias to be used for naming purposes.
      aDescription - The description to be used (without any line breaks).
    • 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.
  • Method Details

    • toType

      protected String toType(String aArg)
      To value.
      Specified by:
      toType in class AbstractOperand<String>
      Parameters:
      aArg - the arg
      Returns:
      the string
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.refcodes.mixin.DescriptionAccessor