Double retValue = null;
for (Annotation annotation : annotations) {
if (PodamDoubleValue.class.isAssignableFrom(annotation.getClass())) {
PodamDoubleValue doubleStrategy = (PodamDoubleValue) annotation;
String numValueStr = doubleStrategy.numValue();
if (null != numValueStr && !"".equals(numValueStr)) {
try {
retValue = Double.valueOf(numValueStr);
} catch (NumberFormatException nfe) {
String errMsg = THE_ANNOTATION_VALUE_STR
+ numValueStr
+ " could not be converted to a Double. An exception will be thrown.";
LOG.error(errMsg);
throw new IllegalArgumentException(errMsg, nfe);
}
} else {
double minValue = doubleStrategy.minValue();
double maxValue = doubleStrategy.maxValue();
// Sanity check
if (minValue > maxValue) {
maxValue = minValue;
}