Constructor and Description |
---|
MultiTypeValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(java.lang.Object value)
Validates the value according to the constraints defined by this validator.
|
<E> ObjectMapper<Validator<E>,MultiTypeValidator> |
map(java.lang.Class<E> type)
Maps a validator to use when the value is assignable to the given type.
|
ObjectMapper<Validator<java.lang.Object[]>,MultiTypeValidator> |
mapArray()
Maps a validator to use when the value is an array.
|
ObjectMapper<Validator<java.lang.Object>,MultiTypeValidator> |
mapOthers()
Maps a validator to the other object types.
|
public final <E> ObjectMapper<Validator<E>,MultiTypeValidator> map(java.lang.Class<E> type)
E
- the typetype
- the type to trigger the validatorpublic final ObjectMapper<Validator<java.lang.Object[]>,MultiTypeValidator> mapArray()
public final ObjectMapper<Validator<java.lang.Object>,MultiTypeValidator> mapOthers()
public final boolean isValid(java.lang.Object value)
Validator