@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class OIDArgumentValueValidator extends ArgumentValueValidator implements java.io.Serializable
Constructor and Description |
---|
OIDArgumentValueValidator()
Creates a new OID address argument value validator that will only accept
strictly valid numeric OIDs.
|
OIDArgumentValueValidator(boolean isStrict)
Creates a new OID address argument value validator that will only accept
valid numeric OIDs.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isStrict()
Indicates whether this validator is configured to operate in strict mode.
|
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.
|
public OIDArgumentValueValidator()
public OIDArgumentValueValidator(boolean isStrict)
isStrict
- Indicates whether to perform strict validation. If this
is false
, then the validator will only sure that
each value is a dotted list of digits that does not start
or end with a period and does not contain two consecutive
periods. If this is true
, then it will also
ensure that it contains at least two components, that the
value of the first component is not greater than two,
and that the value of the second component is not greater
than 39 if the value of the first component is zero or
one.public boolean isStrict()
true
if this validator is configured to operate in strict
mode, or false
if not.public void validateArgumentValue(@NotNull Argument argument, @NotNull java.lang.String valueString) throws ArgumentException
validateArgumentValue
in class ArgumentValueValidator
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.ArgumentException
- If the provided value is determined to be
unacceptable.@NotNull public java.lang.String toString()
toString
in class java.lang.Object