de.jstacs.parameters.validation
Interface ParameterValidator

All Superinterfaces:
Cloneable, Storable
All Known Implementing Classes:
ConstraintValidator, NumberValidator, StorableValidator

public interface ParameterValidator
extends Storable, Cloneable

Interface for a parameter validator, i.e. a class that can validate some possible parameter values.

Author:
Jan Grau

Method Summary
 boolean checkValue(Object value)
          Returns true if the value is valid and false otherwise.
 ParameterValidator clone()
          This method returns a deep copy of the current instance.
 String getErrorMessage()
          Returns the error message if checkValue(Object) returned false.
 
Methods inherited from interface de.jstacs.Storable
toXML
 

Method Detail

checkValue

boolean checkValue(Object value)
Returns true if the value is valid and false otherwise.

Parameters:
value - the Object to be checked
Returns:
if value is valid

getErrorMessage

String getErrorMessage()
Returns the error message if checkValue(Object) returned false.

Returns:
the error message

clone

ParameterValidator clone()
                         throws CloneNotSupportedException
This method returns a deep copy of the current instance.

Returns:
a deep copy of the current index
Throws:
CloneNotSupportedException - if the ParameterValidator could not be cloned
See Also:
Cloneable