Class IA5StringArgumentValueValidator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allowEmptyStrings()
      Indicates whether empty strings should be considered valid.
      java.lang.String toString()
      Retrieves a string representation of this argument value validator.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of this argument value validator to the provided buffer.
      void validateArgumentValue​(Argument argument, java.lang.String valueString)
      Examines the value(s) assigned to the provided argument to determine whether they are acceptable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IA5StringArgumentValueValidator

        public IA5StringArgumentValueValidator()
        Creates a new IA5 string argument value validator. Empty strings will not be considered valid.
      • IA5StringArgumentValueValidator

        public IA5StringArgumentValueValidator​(boolean allowEmptyStrings)
        Creates a new IA5 string argument value validator.
        Parameters:
        allowEmptyStrings - Indicates whether empty strings will be considered valid.
    • Method Detail

      • validateArgumentValue

        public void validateArgumentValue​(@NotNull
                                          Argument argument,
                                          @NotNull
                                          java.lang.String valueString)
                                   throws ArgumentException
        Examines the value(s) assigned to the provided argument to determine whether they are acceptable.
        Specified by:
        validateArgumentValue in class ArgumentValueValidator
        Parameters:
        argument - The argument to which the value is being provided.
        valueString - The string representation of the value to be validated. This value will have already passed any normal validation performed by the argument.
        Throws:
        ArgumentException - If the provided value is determined to be unacceptable.
      • allowEmptyStrings

        public boolean allowEmptyStrings()
        Indicates whether empty strings should be considered valid.
        Returns:
        true if empty strings should be considered valid, or false if not.
      • toString

        @NotNull
        public java.lang.String toString()
        Retrieves a string representation of this argument value validator.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this argument value validator.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this argument value validator to the provided buffer.
        Parameters:
        buffer - The buffer to which the string representation should be appended.