@Test public void testparseFromISO87String () { assertEquals(new BigDecimal("12.34"), ISOCurrency.parseFromISO87String("000000001234", "840"), "2 decimals"); assertEquals(new BigDecimal("1.234"), ISOCurrency.parseFromISO87String("000000001234", "048"), "3 decimals"); assertEquals(new BigDecimal("1234"), ISOCurrency.parseFromISO87String("000000001234", "020"), "no decimals"); }
public static BigDecimal parseFromISO87String (String isoamount, String currency) { int decimals = findCurrency(currency).getDecimals(); return new BigDecimal(isoamount).movePointLeft(decimals); }
ISOCurrency { public static BigDecimal parseFromISO87String (String isoamount, String currency) { int decimals = findCurrency(currency).getDecimals(); return new BigDecimal(isoamount).movePointLeft(decimals); } }
ISOCurrency { public static BigDecimal parseFromISO87String (String isoamount, String currency) { int decimals = findCurrency(currency).getDecimals(); return new BigDecimal(isoamount).movePointLeft(decimals); } private  ISOCurrency(); }
ISOCurrency { public static BigDecimal parseFromISO87String (String isoamount, String currency) { int decimals = findCurrency(currency).getDecimals(); return new BigDecimal(isoamount).movePointLeft(decimals); } private  ISOCurrency(); @SuppressWarnings({"EmptyCatchBlock"}) static void loadPropertiesFromClasspath(String base); static double convertFromIsoMsg(String isoamount, String currency); static String toISO87String(BigDecimal amount, String currency); static BigDecimal parseFromISO87String(String isoamount, String currency); static void addBundle(String bundleName); static String convertToIsoMsg(double amount, String currency); static Object[] decomposeComposedCurrency(String incurr); static String getIsoCodeFromAlphaCode(String alphacode); static Currency getCurrency(int code); static Currency getCurrency(String code); }
ISOCurrency { public static BigDecimal parseFromISO87String (String isoamount, String currency) { int decimals = findCurrency(currency).getDecimals(); return new BigDecimal(isoamount).movePointLeft(decimals); } private  ISOCurrency(); @SuppressWarnings({"EmptyCatchBlock"}) static void loadPropertiesFromClasspath(String base); static double convertFromIsoMsg(String isoamount, String currency); static String toISO87String(BigDecimal amount, String currency); static BigDecimal parseFromISO87String(String isoamount, String currency); static void addBundle(String bundleName); static String convertToIsoMsg(double amount, String currency); static Object[] decomposeComposedCurrency(String incurr); static String getIsoCodeFromAlphaCode(String alphacode); static Currency getCurrency(int code); static Currency getCurrency(String code);  }