Interface Operand<T>

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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      String getAlias()
      Retrieves the name (alias) of the parameter value which can be the name of the operand (Operand) or the option argument (Option), depending on the sub-type inheriting from this interface.
      String[] getArgs()
      Retrieves the command line arguments from the args property.
      T getValue()
      default boolean hasValue()
      When being parsed via the Syntaxable.parseArgs(String[], String[]) method, use this method to determine whether the getValue() method contains parsed value.
      default <V> V toValue​(String aAlias)
      Searches for a value being set for the given for given alias in the syntax tree parsing the command line arguments; if a node in the syntax tree has a value for the given alias, then this value is returned.
      • Methods inherited from interface org.refcodes.mixin.Clonable

        clone
      • Methods inherited from interface org.refcodes.mixin.DescriptionAccessor

        getDescription
      • Methods inherited from interface org.refcodes.component.Resetable

        reset
      • Methods inherited from interface org.refcodes.mixin.TypeAccessor

        getType
      • Methods inherited from interface org.refcodes.mixin.ValueAccessor

        getValueOr
    • Method Detail

      • getValue

        T getValue()
        Specified by:
        getValue in interface org.refcodes.mixin.ValueAccessor<T>
      • getArgs

        String[] getArgs()
        Retrieves the command line arguments from the args property.
        Specified by:
        getArgs in interface ArgsAccessor
        Returns:
        The command line arguments stored by the args property.
      • getAlias

        String getAlias()
        Retrieves the name (alias) of the parameter value which can be the name of the operand (Operand) or the option argument (Option), depending on the sub-type inheriting from this interface. The parameter name is merely used for constructing the command line arguments syntax String via Syntaxable.toSyntax(SyntaxNotation, String, String) and the command line arguments detail description when creating a command line tool's help output. Attention: The alias can also be used as a key when putting an Operand's key/value-pair into a dictionary such as is done by the RuntimeProperties type provided by the refcodes-properties-ext-runime artifact!
        Specified by:
        getAlias in interface org.refcodes.mixin.AliasAccessor
        Returns:
        The name of the parameter, e.g the name of the operand or the name of the option argument.
      • toValue

        default <V> V toValue​(String aAlias)
        Searches for a value being set for the given for given alias in the syntax tree parsing the command line arguments; if a node in the syntax tree has a value for the given alias, then this value is returned.
        Specified by:
        toValue in interface Syntaxable
        Type Parameters:
        V - The type of the value being expected.
        Parameters:
        aAlias - The alias for which to seek for a value being set.
        Returns:
        The according value or null if none has been set for the given alias.