public static String getIsoCodeFromAlphaCode(String alphacode) throws IllegalArgumentException { try { Currency c = findCurrency(alphacode); return ISOUtil.zeropad(Integer.toString(c.getIsoCode()), 3); } catch (ISOException e) { throw new IllegalArgumentException("Failed getIsoCodeFromAlphaCode/ zeropad failed?", e); } }
public static Currency getCurrency(String code) throws ISOException { final String isoCode = ISOUtil.zeropad(code, 3); return findCurrency(isoCode); }
public static Currency getCurrency(int code) throws ISOException { final String isoCode = ISOUtil.zeropad(Integer.toString(code), 3); return findCurrency(isoCode); }