Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.util.validator
Interface Validator

All Known Implementing Classes:
AbstractValidator, AndValidator, DigitCountValidator, EnumerationValidator, LengthValidator, NumberValidator, OrValidator, PatternValidator

public interface Validator

Validator for strings.

Author:
Kai Schwierczek

Method Summary
 String getDescription()
          Returns a human readable representation of this Validator.
 boolean isAlwaysTrue()
          Returns true, if this Validator validates all values to true.
The result must not necessarily be correct.
 String validate(Object value)
          Checks whether the given value is valid.
 

Method Detail

validate

String validate(Object value)
Checks whether the given value is valid.

Parameters:
value - the value to check
Returns:
null, if the value is valid, otherwise the reason why it's invalid

getDescription

String getDescription()
Returns a human readable representation of this Validator.

Returns:
a human readable representation of this Validator

isAlwaysTrue

boolean isAlwaysTrue()
Returns true, if this Validator validates all values to true.
The result must not necessarily be correct. If the validator does not know its result for sure it must return false.

Returns:
true, iff the validator knows for sure, that it validates all values to true

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d