@Test public void testRoundingStringToDouble() { Assert.assertEquals(Double.valueOf(14.33d), NumberUtils.getStringToDoubleRounded(Locale.UK, "14.3333333")); Assert.assertEquals(Double.valueOf(14.34d), NumberUtils.getStringToDoubleRounded(Locale.UK, "14.335")); Assert.assertEquals(Double.valueOf(14.33d), NumberUtils.getStringToDoubleRounded(Locale.GERMANY, "14,3333333")); Assert.assertEquals(Double.valueOf(14.34d), NumberUtils.getStringToDoubleRounded(Locale.GERMANY, "14,335")); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleRounded(Locale.GERMANY, ",")); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleRounded(Locale.GERMANY, "")); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleRounded(Locale.GERMANY, null)); }
public static Double getStringToDoubleRounded(Locale locale, String stringToBeParsed) { boolean doRound = true; return getStringToDouble(locale, stringToBeParsed, doRound); }
NumberUtils { public static Double getStringToDoubleRounded(Locale locale, String stringToBeParsed) { boolean doRound = true; return getStringToDouble(locale, stringToBeParsed, doRound); } }
NumberUtils { public static Double getStringToDoubleRounded(Locale locale, String stringToBeParsed) { boolean doRound = true; return getStringToDouble(locale, stringToBeParsed, doRound); }  }
NumberUtils { public static Double getStringToDoubleRounded(Locale locale, String stringToBeParsed) { boolean doRound = true; return getStringToDouble(locale, stringToBeParsed, doRound); }  static Double neg(Double value); static Double getStringToDoubleNonRounded(Locale locale,
                                                     String stringToBeParsed); static Double getStringToDoubleRounded(Locale locale,
            String stringToBeParsed); static Double divide(Double dividend, Integer divisor); static DivisionResult divideWithLoss(Double dividend,
            Integer divisor, boolean resultToBeNegative); static Double multiply(Double factorA, Integer factorB); static Double multiply(Double factorA, Double factorB); static Double divide(Double dividend, Double divisor); static Double divideForExchangeRates(Double dividend, Double divisor); static Double ensureExchangeRateMinMax(Double double1); static Double ensureAmountMinMax(Double double1); static boolean isExceedingAmountLimit(Double double1); static Double invertExchangeRateDouble(Double exchangeRate); static Double divide(Double dividend, Double divisor, int scale); static double round(double nonRounded); }
NumberUtils { public static Double getStringToDoubleRounded(Locale locale, String stringToBeParsed) { boolean doRound = true; return getStringToDouble(locale, stringToBeParsed, doRound); }  static Double neg(Double value); static Double getStringToDoubleNonRounded(Locale locale,
                                                     String stringToBeParsed); static Double getStringToDoubleRounded(Locale locale,
            String stringToBeParsed); static Double divide(Double dividend, Integer divisor); static DivisionResult divideWithLoss(Double dividend,
            Integer divisor, boolean resultToBeNegative); static Double multiply(Double factorA, Integer factorB); static Double multiply(Double factorA, Double factorB); static Double divide(Double dividend, Double divisor); static Double divideForExchangeRates(Double dividend, Double divisor); static Double ensureExchangeRateMinMax(Double double1); static Double ensureAmountMinMax(Double double1); static boolean isExceedingAmountLimit(Double double1); static Double invertExchangeRateDouble(Double exchangeRate); static Double divide(Double dividend, Double divisor, int scale); static double round(double nonRounded);  }