|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validator
Object validator interface. Implementors of this class can be added to any
Validatable
object to verify its value. The
Validatable#isValid(Object)
iterates all registered
Validator
s, calling their validate(Object)
methods.
validate(Object)
should throw the
Validator.InvalidValueException
if the given value is not valid by
its standards.
Nested Class Summary | |
---|---|
static class |
Validator.EmptyValueException
|
static class |
Validator.InvalidValueException
Invalid value exception can be thrown by Validator when a given
value is not valid. |
Method Summary | |
---|---|
boolean |
isValid(Object value)
Tests if the given value is valid. |
void |
validate(Object value)
Checks the given value against this validator. |
Method Detail |
---|
void validate(Object value) throws Validator.InvalidValueException
Validator.InvalidValueException
value
- the value to check
Validator.InvalidValueException
- if the value is not validboolean isValid(Object value)
value
- the value to check
true
for valid value, otherwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |