Beispiel #1
0
 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);
   }
 }
Beispiel #2
0
 public static Currency getCurrency(String code) throws ISOException {
   final String isoCode = ISOUtil.zeropad(code, 3);
   return findCurrency(isoCode);
 }
Beispiel #3
0
 public static Currency getCurrency(int code) throws ISOException {
   final String isoCode = ISOUtil.zeropad(Integer.toString(code), 3);
   return findCurrency(isoCode);
 }