/** * Get a {@code CurrencyCode} that corresponds to the given * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * * <p> * This method calls {@link #getByCode(String, boolean) getByCode}{@code (code, false)}. * </p> * * @param code * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. Or {@code "UNDEFINED"} (case insensitive). * * @return * A {@code CurrencyCode} instance, or {@code null} if not found. * * @since 1.13 * * @see #getByCode(String, boolean) */ public static CurrencyCode getByCodeIgnoreCase(String code) { return getByCode(code, false); }
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(String, boolean) * getByCountry}{@code (country, false)}. * </p> * * @param country * Country code. ISO 3166-1 alpha-2 or alpha-3. * * @return * List of {@code CurrencyCode} instances. If there is no * {@code CurrencyCode} instance whose country list contains * the specified country, the size of the returned list is zero. * * @since 1.13 */ public static List<CurrencyCode> getByCountryIgnoreCase(String country) { return getByCountry(country, false); }
currency, currency.getName()); currency.getCountryList();
for (CurrencyCode currency : values())
return Currency.getInstance(this.name());
return findByName(pattern);
code = canonicalize(code, caseSensitive);
for (CurrencyCode currency : values())
return Currency.getInstance(this.name());
return findByName(pattern);
code = canonicalize(code, caseSensitive);
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(String, boolean) * getByCountry}{@code (country, false)}. * </p> * * @param country * Country code. ISO 3166-1 alpha-2 or alpha-3. * * @return * List of {@code CurrencyCode} instances. If there is no * {@code CurrencyCode} instance whose country list contains * the specified country, the size of the returned list is zero. * * @since 1.13 */ public static List<CurrencyCode> getByCountryIgnoreCase(String country) { return getByCountry(country, false); }
/** * Get a {@code CurrencyCode} that corresponds to the given * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * * <p> * This method calls {@link #getByCode(String, boolean) getByCode}{@code (code, false)}. * </p> * * @param code * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. Or {@code "UNDEFINED"} (case insensitive). * * @return * A {@code CurrencyCode} instance, or {@code null} if not found. * * @since 1.13 * * @see #getByCode(String, boolean) */ public static CurrencyCode getByCodeIgnoreCase(String code) { return getByCode(code, false); }
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(String, boolean) * getByCountry}{@code (country, true)}. * Note that the behavior has changed since the version 1.13. * In the older versions, this method was an alias of {@code * getByCountry(code, false)}. * </p> * * @param country * Country code. ISO 3166-1 alpha-2 or alpha-3. * * @return * List of {@code CurrencyCode} instances. If there is no * {@code CurrencyCode} instance whose country list contains * the specified country, the size of the returned list is zero. */ public static List<CurrencyCode> getByCountry(String country) { return getByCountry(country, true); }
/** * Get a {@code CurrencyCode} that corresponds to the given * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * * <p> * This method calls {@link #getByCode(String, boolean) getByCode}{@code (code, true)}. * Note that the behavior has changed since the version 1.13. In the older versions, * this method was an alias of {@code getByCode(code, false)}. * </p> * * @param code * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * When {@code "UNDEFINED"} is given, {@link #UNDEFINED CurrencyCode.UNDEFINED} * is returned. * * @return * A {@code CurrencyCode} instance, or {@code null} if not found. * * @see #getByCode(String, boolean) */ public static CurrencyCode getByCode(String code) { return getByCode(code, true); }
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(String, boolean) * getByCountry}{@code (country, true)}. * Note that the behavior has changed since the version 1.13. * In the older versions, this method was an alias of {@code * getByCountry(code, false)}. * </p> * * @param country * Country code. ISO 3166-1 alpha-2 or alpha-3. * * @return * List of {@code CurrencyCode} instances. If there is no * {@code CurrencyCode} instance whose country list contains * the specified country, the size of the returned list is zero. */ public static List<CurrencyCode> getByCountry(String country) { return getByCountry(country, true); }
/** * Get a {@code CurrencyCode} that corresponds to the given * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * * <p> * This method calls {@link #getByCode(String, boolean) getByCode}{@code (code, true)}. * Note that the behavior has changed since the version 1.13. In the older versions, * this method was an alias of {@code getByCode(code, false)}. * </p> * * @param code * <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> * alpha-3 code. * When {@code "UNDEFINED"} is given, {@link #UNDEFINED CurrencyCode.UNDEFINED} * is returned. * * @return * A {@code CurrencyCode} instance, or {@code null} if not found. * * @see #getByCode(String, boolean) */ public static CurrencyCode getByCode(String code) { return getByCode(code, true); }
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(CountryCode) * getByCountry}{@code (}{@link CountryCode}{@code .}{@link * CountryCode#getByCode(String, boolean) getByCode}{@code * (country, caseSensitive))}. * </p> * * @param country * Country code. ISO 3166-1 alpha-2 or alpha-3. * * @param caseSensitive * If {@code true}, the given code should consist of uppercase * letters only. If {@code false}, case is ignored. * * @return * List of {@code CurrencyCode} instances. If there is no * {@code CurrencyCode} instance whose country list contains * the specified country, the size of the returned list is zero. */ public static List<CurrencyCode> getByCountry(String country, boolean caseSensitive) { return getByCountry(CountryCode.getByCode(country, caseSensitive)); }