Class UIOptionCollection.Builder<T extends UIOption<T>,B extends UIOptionCollection.Builder<T,B>>

java.lang.Object
org.apache.rat.ui.UIOptionCollection.Builder<T,B>
Type Parameters:
T - the concreate type of the UIOption.
B - the concrete type the Builder.
Enclosing class:
UIOptionCollection<T extends UIOption<T>>

protected static class UIOptionCollection.Builder<T extends UIOption<T>,B extends UIOptionCollection.Builder<T,B>> extends Object
Builder for a UIOptionCollection.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final List<org.apache.commons.cli.Option>
    The list of unsupported RAT options.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Builder(Supplier<UIOption.Builder<T,?>> uiOptionBiulderSupplier)
    Constructor for the UI option collection builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    defaultValue(org.apache.commons.cli.Option option, String value)
    Specify the default values for an option.
    defaultValue(Arg arg, String value)
    Specify the default values for an Arg.
    protected final B
    Returns this cast to <B> class.
    uiOption(org.apache.commons.cli.Option option)
    Add an Option to the collection as a UIOption.
    uiOptions(org.apache.commons.cli.Option... options)
    Add multiple Option instances to the collection as UIOptions.
    unsupported(org.apache.commons.cli.Option option)
    Register an Option as unsupported.
    Register multiple Options as unsupported.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • unsupportedRatOptions

      protected final List<org.apache.commons.cli.Option> unsupportedRatOptions
      The list of unsupported RAT options.
  • Constructor Details

    • Builder

      protected Builder(Supplier<UIOption.Builder<T,?>> uiOptionBiulderSupplier)
      Constructor for the UI option collection builder.
  • Method Details

    • self

      protected final B self()
      Returns this cast to <B> class.
      Returns:
      this as <B> class.
    • uiOption

      public B uiOption(org.apache.commons.cli.Option option)
      Add an Option to the collection as a UIOption.
      Parameters:
      option - the Option to add.
      Returns:
      this
    • uiOptions

      public B uiOptions(org.apache.commons.cli.Option... options)
      Add multiple Option instances to the collection as UIOptions.
      Parameters:
      options - the Option instances to add.
      Returns:
      this
    • unsupported

      public B unsupported(org.apache.commons.cli.Option option)
      Register an Option as unsupported.
      Parameters:
      option - the Option that is not be supported. This should be an option in the Arg collection.
      Returns:
      this
    • unsupported

      public B unsupported(Arg arg)
      Register multiple Options as unsupported. Will ignore all the options associated with the specified Arg.
      Parameters:
      arg - The Arg to ignore.
      Returns:
      this
    • defaultValue

      public B defaultValue(org.apache.commons.cli.Option option, String value)
      Specify the default values for an option.
      Parameters:
      option - the option to specify the default value for.
      value - the value for the option.
      Returns:
      this
    • defaultValue

      public B defaultValue(Arg arg, String value)
      Specify the default values for an Arg.
      Parameters:
      arg - the Arg to specify the default value for.
      value - the value for the option.
      Returns:
      this