Examples of PodamDoubleValue


Examples of uk.co.jemos.podam.common.PodamDoubleValue

    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;
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.