Interface ExtraArgument

All Known Implementing Classes:
DefaultExtraArgument

public interface ExtraArgument
A representation of an extra, non-option command line argument.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the argument name.
    default int
    Get the allow number of arguments of this type.
    boolean
    Get if the argument is required.
    newInstance(String name, boolean required)
    Create a new extra argument instance.
  • Method Details

    • newInstance

      @NonNull static ExtraArgument newInstance(@NonNull String name, boolean required)
      Create a new extra argument instance.
      Parameters:
      name - the argument name
      required - true if the argument is required, or false otherwise
      Returns:
      the instance
    • getName

      Get the argument name.
      Returns:
      the name
    • isRequired

      boolean isRequired()
      Get if the argument is required.
      Returns:
      true if the argument is required, or false otherwise
    • getNumber

      default int getNumber()
      Get the allow number of arguments of this type.
      Returns:
      the allowed number of arguments as a positive number or -1 for unlimited