Package com.unboundid.util.args
Class RegularExpressionArgumentValueValidator
- java.lang.Object
-
- com.unboundid.util.args.ArgumentValueValidator
-
- com.unboundid.util.args.RegularExpressionArgumentValueValidator
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class RegularExpressionArgumentValueValidator extends ArgumentValueValidator implements java.io.Serializable
This class provides an implementation of an argument value validator that is expected to be used with a string argument and ensures that all values for the argument are valid regular expressions. Note that it does not verify that values match a given regular expression, but that can already be accomplished with theStringArgument.setValueRegex(java.util.regex.Pattern, java.lang.String)
method.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RegularExpressionArgumentValueValidator()
Creates a new instance of this regular expression argument value validator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
RegularExpressionArgumentValueValidator
public RegularExpressionArgumentValueValidator()
Creates a new instance of this regular expression argument value validator.
-
-
Method Detail
-
validateArgumentValue
public void validateArgumentValue(Argument argument, 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 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.
-
toString
public java.lang.String toString()
Retrieves a string representation of this argument value validator.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this argument value validator.
-
toString
public void toString(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.
-
-