| java.lang.Object org.naturalcli.ParameterValidator
ParameterValidator | public class ParameterValidator (Code) | | This class checks parameters values against their types.
author: Ferran Busquets See Also: IParameterType |
ParameterValidator | public ParameterValidator()(Code) | | Creates a new instance of ParameterValidator with default parameter types
|
ParameterValidator | public ParameterValidator(Collection<IParameterType> parameterTypes)(Code) | | Creates a new instance of ParameterValidator
Parameters: parameterTypes - the parameter types collection |
getParameterType | public IParameterType getParameterType(String type)(Code) | | Gets the parameter type for the given type name
Parameters: type - the type name the paramter type object |
validate | public String validate(String value, String type) throws UnknownParameterType(Code) | | Validate a parameter value for a type
Parameters: value - the parameter value Parameters: type - the parameter type name null if validated, otherwise a error message throws: UnknownParameterType - raised if the parameter is not found |
|
|