Examples of CurrencyFilter


Examples of com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter

   *            the date for which to retrieve currency codes for the given locale.
   * @return The array of ISO currency codes.
   * @stable ICU 4.0
   */
  public static String[] getAvailableCurrencyCodes(final ULocale loc, final Date d) {
    CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(loc.getCountry());
    List<String> list = getTenderCurrencies(filter);
    // Note: Prior to 4.4 the spec didn't say that we return null if there are no results, but
    // the test assumed it did.  Kept the behavior and amended the spec.
    if (list.isEmpty()) {
      return null;
View Full Code Here

Examples of com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter

      }
      ULocale loc = ULocale.addLikelySubtags(locale);
      prefRegion = loc.getCountry();
    }

    CurrencyFilter filter = CurrencyFilter.now().withRegion(prefRegion);

    // currencies are in region's preferred order when we're filtering on region, which
    // matches our spec
    List<String> result = getTenderCurrencies(filter);
View Full Code Here

Examples of com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter

    List<String> all = (ALL_TENDER_CODES == null) ? null : ALL_TENDER_CODES.get();
    if (all == null) {
      // Filter out non-tender currencies which have "from" date set to 9999-12-31
      // CurrencyFilter has "to" value set to 9998-12-31 in order to exclude them
      //CurrencyFilter filter = CurrencyFilter.onDateRange(null, new Date(253373299200000L));
      CurrencyFilter filter = CurrencyFilter.all();
      all = Collections.unmodifiableList(getTenderCurrencies(filter));
      ALL_TENDER_CODES = new SoftReference<List<String>>(all);
    }
    return all;
  }
View Full Code Here

Examples of com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter

     * @return The array of ISO currency codes.
     * @stable ICU 4.0
     */
    public static String[] getAvailableCurrencyCodes(ULocale loc, Date d) {
        CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();
        CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(loc.getCountry());
        List<String> list = info.currencies(filter);
        // Note: Prior to 4.4 the spec didn't say that we return null if there are no results, but
        // the test assumed it did.  Kept the behavior and amended the spec.
        if (list.isEmpty()) {
            return null;
View Full Code Here

Examples of com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter

            }
            ULocale loc = ULocale.addLikelySubtags(locale);
            prefRegion = loc.getCountry();
       }

        CurrencyFilter filter = CurrencyFilter.now().withRegion(prefRegion);
       
        // currencies are in region's preferred order when we're filtering on region, which
        // matches our spec
        List<String> result = info.currencies(filter);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.