Examples of PodamFloatValue


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

    Float retValue = null;

    for (Annotation annotation : annotations) {

      if (PodamFloatValue.class.isAssignableFrom(annotation.getClass())) {
        PodamFloatValue floatStrategy = (PodamFloatValue) annotation;

        String numValueStr = floatStrategy.numValue();
        if (null != numValueStr && !"".equals(numValueStr)) {
          try {
            retValue = Float.valueOf(numValueStr);
          } catch (NumberFormatException nfe) {
            String errMsg = THE_ANNOTATION_VALUE_STR
                + numValueStr
                + " could not be converted to a Float. An exception will be thrown.";
            LOG.error(errMsg);
            throw new IllegalArgumentException(errMsg, nfe);
          }
        } else {

          float minValue = floatStrategy.minValue();
          float maxValue = floatStrategy.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.