Class ShortValidator

java.lang.Object
com.github.sttk.cliargs.validators.ShortValidator
All Implemented Interfaces:
Validator

public class ShortValidator extends Object implements Validator
Is the validator class which provides the method to validate an option argument string as a Short.
  • Constructor Details

    • ShortValidator

      public ShortValidator()
      The default constructor.
  • Method Details

    • validate

      public void validate(String storeKey, String name, String arg) throws OptionArgIsInvalid
      Validates an option argument string whether it is valid format of the specified type, etc.
      Specified by:
      validate in interface Validator
      Parameters:
      storeKey - The store key used to store in Cmd instance.
      name - The option name.
      arg - The option argument string in command line arguments.
      Throws:
      OptionArgIsInvalid - If the option argument is invalid.