|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.param.AbstractParamValidator
public abstract class AbstractParamValidator
The AbstractParamValidator acts as a base class for implementations of ParamValidator
interface by providing some default method implementations and several utility methods for common validators.
ParamValidator| Field Summary | |
|---|---|
protected Logger |
_logger
|
| Constructor Summary | |
|---|---|
protected |
AbstractParamValidator()
|
| Method Summary | |
|---|---|
boolean |
equalValues(Parameter parameter,
Object value1,
Object value2)
Tests if the given two values are equal taking the given parameter information into account. |
protected static boolean |
isAllowedNullText(Parameter parameter,
String text)
Tests if the given text is an allowed zero-length text string for the given parameter. |
protected static boolean |
isAllowedNullValue(Parameter parameter,
Object value)
Tests if the given object is an allowed null value for the given parameter. |
protected boolean |
isValueContainedInValueSet(Parameter parameter,
Object value)
Tests if the value passed in is containe in the value set defined by the Parameter passed as argument. |
protected void |
validateThatNullValueIsAllowed(Parameter parameter,
Object value)
Tests if the value passed in is null, and if so, if this is an allowed value defined by the parameter. |
protected void |
validateThatValueIsInValueSet(Parameter parameter,
Object value)
Checks if a value object is contained in the valueset defined by the parameter. |
protected void |
validateThatValuesAreInValueSet(Parameter parameter,
Object[] values)
Checks if a vector of value objects is contained in the valueset defined bay the parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.esa.beam.framework.param.ParamValidator |
|---|
format, parse, validate |
| Field Detail |
|---|
protected Logger _logger
| Constructor Detail |
|---|
protected AbstractParamValidator()
| Method Detail |
|---|
public boolean equalValues(Parameter parameter,
Object value1,
Object value2)
ParamValidator
equalValues in interface ParamValidatorparameter - the parameter, must not be nullvalue1 - the first value, can be nullvalue2 - the second value, can also be null
true if the value are equal, false otherwise
protected void validateThatNullValueIsAllowed(Parameter parameter,
Object value)
throws ParamValidateException
parameter - the Parameter defining the null value behaviourvalue - the value to be checked
ParamValidateException
protected void validateThatValuesAreInValueSet(Parameter parameter,
Object[] values)
throws ParamValidateException
parameter - the Parameter defining the valuesetvalues - vector of objects to be checked
ParamValidateException
protected void validateThatValueIsInValueSet(Parameter parameter,
Object value)
throws ParamValidateException
parameter - the Parameter defining the valuesetvalue - object to be checked
ParamValidateException
protected boolean isValueContainedInValueSet(Parameter parameter,
Object value)
parameter - the parameter whose value set is to be checkedvalue - the value to be checked
protected static boolean isAllowedNullText(Parameter parameter,
String text)
parameter - the parametertext - the text to test
true if so
protected static boolean isAllowedNullValue(Parameter parameter,
Object value)
parameter - the parametervalue - the value to test
true if so
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||