Package com.unboundid.util.args
Class IA5StringArgumentValueValidator
java.lang.Object
com.unboundid.util.args.ArgumentValueValidator
com.unboundid.util.args.IA5StringArgumentValueValidator
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class IA5StringArgumentValueValidator
extends ArgumentValueValidator
implements Serializable
This class provides an implementation of an argument value validator that
ensures that values can be parsed as valid IA5 strings (that is, strings
containing only ASCII characters).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new IA5 string argument value validator.IA5StringArgumentValueValidator(boolean allowEmptyStrings) Creates a new IA5 string argument value validator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether empty strings should be considered valid.toString()Retrieves a string representation of this argument value validator.voidtoString(StringBuilder buffer) Appends a string representation of this argument value validator to the provided buffer.voidvalidateArgumentValue(Argument argument, String valueString) Examines the value(s) assigned to the provided argument to determine whether they are acceptable.
-
Constructor Details
-
IA5StringArgumentValueValidator
public IA5StringArgumentValueValidator()Creates a new IA5 string argument value validator. Empty strings will not be considered valid. -
IA5StringArgumentValueValidator
Creates a new IA5 string argument value validator.- Parameters:
allowEmptyStrings- Indicates whether empty strings will be considered valid.
-
-
Method Details
-
validateArgumentValue
public void validateArgumentValue(@NotNull Argument argument, @NotNull String valueString) throws ArgumentException Examines the value(s) assigned to the provided argument to determine whether they are acceptable.- Specified by:
validateArgumentValuein classArgumentValueValidator- 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
Indicates whether empty strings should be considered valid.- Returns:
trueif empty strings should be considered valid, orfalseif not.
-
toString
Retrieves a string representation of this argument value validator. -
toString
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.
-