class LoaderUtils {

  public static Optional<Currency> tryParseCurrency(String str) {
    if (str != null && str.length() == 3 && CURRENCY_MATCHER.matchesAllOf(str)) {
      try {
        return Optional.of(Currency.parse(str));
      } catch (RuntimeException ex) {
        // ignore
      }
    }
    return Optional.empty();
  }

  private  LoaderUtils();

}