public class CharPropertyMetadata extends BoundedValueTypePropertyMetadata<java.lang.Character>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SHOULD_NOT_BE_NULL_CHAR
Error message for null character
|
PROPERTY_ERROR_MAX_LESS_THAN_MIN, SHOULD_NOT_BE_GREATER_THAN, SHOULD_NOT_BE_LESS_THAN
SHOULD_NOT_BE_NULL
PROPERTY_ERROR_INVALID_NAME
Constructor and Description |
---|
CharPropertyMetadata(java.lang.String name,
java.lang.Character minValue,
java.lang.Character maxValue,
boolean notNullChar,
boolean notNull)
Initializes with the property name and a pair of a min and max values (inclusive), as well as whether the null '\0' char is not
allowed.
|
CharPropertyMetadata(java.lang.String name,
char minValue,
char maxValue,
boolean notNullChar)
Initializes with the property name and a pair of a min and max values (inclusive), as well as whether the null '\0' char is not
allowed.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getNotNullChar() |
void |
setNotNullChar(boolean notNullChar) |
java.lang.Character |
validate(java.lang.Character value)
Validates the given value with the current constraints.
|
getMaxValue, getMinValue, setMaxValue, setMinValue
getNotNull, setNotNull
getName, setName
public static final java.lang.String SHOULD_NOT_BE_NULL_CHAR
public CharPropertyMetadata(java.lang.String name, char minValue, char maxValue, boolean notNullChar)
java.lang.IllegalArgumentException
- An argument is invalidpublic CharPropertyMetadata(java.lang.String name, java.lang.Character minValue, java.lang.Character maxValue, boolean notNullChar, boolean notNull)
java.lang.IllegalArgumentException
- An argument is invalidpublic boolean getNotNullChar()
public void setNotNullChar(boolean notNullChar)
public java.lang.Character validate(java.lang.Character value) throws ValidationException
validate
in interface IPropertyMetadata<java.lang.Character>
validate
in class BoundedValueTypePropertyMetadata<java.lang.Character>
ValidationException
- Thrown upon validation errors