亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? currency.java

?? linux下編程用 編譯軟件
?? JAVA
字號:
/* Currency.java -- Representation of a currency   Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version. GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package java.util;import gnu.java.locale.LocaleHelper;import java.io.IOException;import java.io.ObjectStreamException;import java.io.Serializable;/** * Representation of a currency for a particular locale.  Each currency * is identified by its ISO 4217 code, and only one instance of this * class exists per currency.  As a result, instances are created * via the <code>getInstance()</code> methods rather than by using * a constructor. * * @see java.util.Locale * @author Guilhem Lavaux  (guilhem.lavaux@free.fr) * @author Dalibor Topic (robilad@kaffe.org) * @author Bryce McKinlay (mckinlay@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.4 */public final class Currency   implements Serializable{  /**   * For compatability with Sun's JDK   */  static final long serialVersionUID = -158308464356906721L;  /**   * The set of properties which map a currency to   * the currency information such as the ISO 4217   * currency code and the number of decimal points.   *   * @see #getCurrencyCode()   * @serial ignored.   */  private static transient Properties properties;  /**   * The ISO 4217 currency code associated with this   * particular instance.   *   * @see #getCurrencyCode()   * @serial the ISO 4217 currency code   */  private String currencyCode;  /**   * The number of fraction digits associated with this   * particular instance.   *   * @see #getDefaultFractionDigits()   * @serial the number of fraction digits   */  private transient int fractionDigits;    /**   * A cached map of country codes   * instances to international currency code   * <code>String</code>s.  Seperating this   * from the <code>Currency</code> instances   * ensures we have a common lookup between   * the two <code>getInstance()</code> methods.   *   * @see #getInstance(java.util.Locale)   * @serial ignored.   */  private static transient Map countryMap;  /**   * A cache of <code>Currency</code> instances to   * ensure the singleton nature of this class.  The key   * is the international currency code.   *   * @see #getInstance(java.util.Locale)   * @see #getInstance(java.lang.String)    * @see #readResolve()   * @serial ignored.   */  private static transient Map cache;  /**   * Instantiates the cache and reads in the properties.   */  static  {    /* Create a hash map for the locale mappings */    countryMap = new HashMap();    /* Create a hash map for the cache */    cache = new HashMap();    /* Create the properties object */    properties = new Properties();    /* Try and load the properties from our iso4217.properties resource */    try       {        properties.load(Currency.class.getResourceAsStream("iso4217.properties"));      }    catch (IOException exception)      {        System.out.println("Failed to load currency resource: " + exception);      }  }  /**   * Default constructor for deserialization   */  private Currency()  {  }  /**   * Constructor to create a <code>Currency</code> object   * for a particular <code>Locale</code>.   * All components of the given locale, other than the   * country code, are ignored.  The results of calling this   * method may vary over time, as the currency associated with   * a particular country changes.  For countries without   * a given currency (e.g. Antarctica), the result is null.    *   * @param loc the locale for the new currency, or null if   *        there is no country code specified or a currency   *        for this country.   */  private Currency(Locale loc)  {    String countryCode;    String currencyKey;    String fractionDigitsKey;    int commaPosition;    /* Retrieve the country code from the locale */    countryCode = loc.getCountry();    /* If there is no country code, return */    if (countryCode.equals(""))      {        throw new	  IllegalArgumentException("Invalid (empty) country code for locale:"			  	   + loc);      }    /* Construct the key for the currency */    currencyKey = countryCode + ".currency";    /* Construct the key for the fraction digits */    fractionDigitsKey = countryCode + ".fractionDigits";    /* Retrieve the currency */    currencyCode = properties.getProperty(currencyKey);    /* Return if the currency code is null */    if (currencyCode == null)      {        return;      }    /* Split off the first currency code (we only use the first for now) */    commaPosition = currencyCode.indexOf(",");    if (commaPosition != -1)      {        currencyCode = currencyCode.substring(0, commaPosition);      }    /* Retrieve the fraction digits */    fractionDigits = Integer.parseInt(properties.getProperty(fractionDigitsKey));  }  /**   * Constructor for the "XXX" special case.  This allows   * a Currency to be constructed from an assumed good   * currency code.   *   * @param code the code to use.   */    private Currency(String code)  {    currencyCode = code;    fractionDigits = -1; /* Pseudo currency */  }  /**   * Returns the ISO4217 currency code of this currency.   *   * @return a <code>String</code> containing currency code.   */  public String getCurrencyCode()  {    return currencyCode;  }  /**   * Returns the number of digits which occur after the decimal point   * for this particular currency.  For example, currencies such   * as the U.S. dollar, the Euro and the Great British pound have two   * digits following the decimal point to indicate the value which exists   * in the associated lower-valued coinage (cents in the case of the first   * two, pennies in the latter).  Some currencies such as the Japanese   * Yen have no digits after the decimal point.  In the case of pseudo   * currencies, such as IMF Special Drawing Rights, -1 is returned.   *   * @return the number of digits after the decimal separator for this currency.   */     public int getDefaultFractionDigits()  {    return fractionDigits;  }      /**   * Builds a new currency instance for this locale.   * All components of the given locale, other than the   * country code, are ignored.  The results of calling this   * method may vary over time, as the currency associated with   * a particular country changes.  For countries without   * a given currency (e.g. Antarctica), the result is null.    *   * @param locale a <code>Locale</code> instance.   * @return a new <code>Currency</code> instance.   * @throws NullPointerException if the locale or its   *         country code is null.   * @throws IllegalArgumentException if the country of   *         the given locale is not a supported ISO3166 code.   */   public static Currency getInstance(Locale locale)  {    /**     * The new instance must be the only available instance     * for the currency it supports.  We ensure this happens,     * while maintaining a suitable performance level, by     * creating the appropriate object on the first call to     * this method, and returning the cached instance on     * later calls.     */    Currency newCurrency;    String country = locale.getCountry();    if (locale == null || country == null)      {	throw new	  NullPointerException("The locale or its country is null.");      }    /* Attempt to get the currency from the cache */    String code = (String) countryMap.get(country);    if (code == null)      {        /* Create the currency for this locale */        newCurrency = new Currency(locale);        /*          * If the currency code is null, then creation failed         * and we return null.         */	code = newCurrency.getCurrencyCode();        if (code == null)          {            return null;          }        else           {            /* Cache it */            countryMap.put(country, code);	    cache.put(code, newCurrency);          }      }    else      {	newCurrency = (Currency) cache.get(code);      }    /* Return the instance */    return newCurrency;  }  /**   * Builds the currency corresponding to the specified currency code.   *   * @param currencyCode a string representing a currency code.   * @return a new <code>Currency</code> instance.   * @throws NullPointerException if currencyCode is null.   * @throws IllegalArgumentException if the supplied currency code   *         is not a supported ISO 4217 code.   */  public static Currency getInstance(String currencyCode)  {    Locale[] allLocales;    /*      * Throw a null pointer exception explicitly if currencyCode is null.     * One is not thrown otherwise.  It results in an     * IllegalArgumentException.      */    if (currencyCode == null)      {        throw new NullPointerException("The supplied currency code is null.");      }    /* Nasty special case to allow an erroneous currency... blame Sun */    if (currencyCode.equals("XXX"))      return new Currency("XXX");    Currency newCurrency = (Currency) cache.get(currencyCode);    if (newCurrency == null)      {	/* Get all locales */	allLocales = Locale.getAvailableLocales();	/* Loop through each locale, looking for the code */	for (int i = 0;i < allLocales.length; i++)	  {	    try	      {		Currency testCurrency = getInstance (allLocales[i]);		if (testCurrency != null &&		    testCurrency.getCurrencyCode().equals(currencyCode))		  {		    return testCurrency;		  }	      }	    catch (IllegalArgumentException exception)	      {		/* Ignore locales without valid countries */	      }	  }	/* 	 * If we get this far, the code is not supported by any of	 * our locales.	 */	throw new IllegalArgumentException("The currency code, " + currencyCode +					   ", is not supported.");      }    else      {	return newCurrency;      }  }  /**   * This method returns the symbol which precedes or follows a   * value in this particular currency in the default locale.   * In cases where there is no such symbol for the currency,   * the ISO 4217 currency code is returned.   *   * @return the currency symbol, or the ISO 4217 currency code if   *         one doesn't exist.   */  public String getSymbol()  {    return getSymbol(Locale.getDefault());  }  /**   * <p>   * This method returns the symbol which precedes or follows a   * value in this particular currency.  The returned value is   * the symbol used to denote the currency in the specified locale.   * </p>   * <p>   * For example, a supplied locale may specify a different symbol   * for the currency, due to conflicts with its own currency.   * This would be the case with the American currency, the dollar.   * Locales that also use a dollar-based currency (e.g. Canada, Australia)   * need to differentiate the American dollar using 'US$' rather than '$'.   * So, supplying one of these locales to <code>getSymbol()</code> would   * return this value, rather than the standard '$'.   * </p>   * <p>   * In cases where there is no such symbol for a particular currency,   * the ISO 4217 currency code is returned.   * </p>   *   * @param locale the locale to express the symbol in.   * @return the currency symbol, or the ISO 4217 currency code if   *         one doesn't exist.   * @throws NullPointerException if the locale is null.   */  public String getSymbol(Locale locale)  {    return LocaleHelper.getLocalizedString(locale, currencyCode,					   "currenciesSymbol", false, true);  }  /**   * Returns the international ISO4217 currency code of this currency.   *   * @return a <code>String</code> containing the ISO4217 currency code.   */  public String toString()  {    return getCurrencyCode();  }  /**   * Resolves the deserialized object to the singleton instance for its   * particular currency.  The currency code of the deserialized instance   * is used to return the correct instance.   *   * @return the singleton instance for the currency specified by the   *         currency code of the deserialized object.  This replaces   *         the deserialized object as the returned object from   *         deserialization.   * @throws ObjectStreamException if a problem occurs with deserializing   *         the object.   */  private Object readResolve()    throws ObjectStreamException  {    return getInstance(currencyCode);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产露脸精彩对白 | 国产精品久久久久久久久晋中| 国产婷婷色一区二区三区四区| 亚洲精选在线视频| 韩国在线一区二区| 3atv在线一区二区三区| 国产精品国产三级国产普通话蜜臀 | 亚洲午夜在线观看视频在线| 国产一区不卡视频| 欧美久久久久久久久| 亚洲伦在线观看| 国产成人综合亚洲网站| 日韩欧美中文字幕制服| 亚洲一区二区三区四区不卡| 风间由美一区二区av101| 欧美一级搡bbbb搡bbbb| 亚洲一区欧美一区| 99久久婷婷国产| 国产午夜精品久久| 经典三级在线一区| 欧美一区二区三区婷婷月色| 亚洲综合一区在线| 色呦呦国产精品| 亚洲欧美一区二区三区久本道91| 国产福利一区二区三区视频 | 99久久99久久免费精品蜜臀| 2022国产精品视频| 久久成人免费电影| 日韩精品在线网站| 久久er99热精品一区二区| 91麻豆精品国产91| 五月综合激情日本mⅴ| 欧美日韩精品一区二区三区蜜桃| 亚洲美女在线一区| 欧美午夜一区二区| 亚洲午夜私人影院| 欧美视频一区二区三区四区 | 精品视频1区2区| 一区二区欧美在线观看| 色一情一乱一乱一91av| 亚洲欧美日韩国产综合| 日本乱码高清不卡字幕| 一区二区三区不卡视频在线观看| 色天使久久综合网天天| 亚洲一区二区三区激情| 在线成人免费视频| 韩国av一区二区三区| 久久夜色精品一区| www.日本不卡| 亚洲午夜精品在线| 欧美一区二区女人| 国产盗摄一区二区| 亚洲少妇30p| 欧美日韩精品三区| 精品在线免费观看| 国产精品国产自产拍高清av| 日本韩国一区二区三区| 青青草伊人久久| 欧美激情综合网| 在线观看视频一区二区 | 91精品国产综合久久久久久| 美腿丝袜在线亚洲一区| 国产欧美一区二区精品秋霞影院 | 国产精品的网站| 色噜噜偷拍精品综合在线| 亚州成人在线电影| 久久免费美女视频| 色婷婷精品久久二区二区蜜臀av| 日韩精品一卡二卡三卡四卡无卡| 2024国产精品| 欧美四级电影在线观看| 国模套图日韩精品一区二区| 亚洲欧美日韩国产中文在线| 日韩一区二区在线免费观看| 成人综合日日夜夜| 亚洲va国产va欧美va观看| 国产亚洲精品超碰| 欧美午夜影院一区| kk眼镜猥琐国模调教系列一区二区| 亚洲国产日韩av| 国产欧美日韩视频在线观看| 欧美色爱综合网| 99re亚洲国产精品| 久久99精品国产.久久久久久| 亚洲欧美一区二区三区久本道91| 久久亚洲欧美国产精品乐播| 在线观看免费成人| 成+人+亚洲+综合天堂| 蜜臀精品一区二区三区在线观看 | 在线一区二区三区四区| 国产一区二区美女诱惑| 亚洲bt欧美bt精品777| 亚洲精品视频免费看| 久久久精品蜜桃| 欧美精品久久99| 日本韩国精品在线| 91丝袜国产在线播放| 国产乱人伦精品一区二区在线观看 | 91精品福利视频| 成人一区二区三区视频| 国产一区二区日韩精品| 日本欧美一区二区三区| 天涯成人国产亚洲精品一区av| 亚洲天堂福利av| 国产日韩欧美不卡| 久久人人97超碰com| 精品久久久久av影院| 欧美一区日本一区韩国一区| 欧美色网站导航| 在线免费不卡视频| 欧美午夜电影在线播放| 91久久香蕉国产日韩欧美9色| 成人福利在线看| 成人h动漫精品一区二| 成人手机在线视频| 成人av网站免费观看| 成人午夜激情在线| 成人18精品视频| av一区二区三区四区| 一本色道**综合亚洲精品蜜桃冫| caoporm超碰国产精品| 99久久精品免费看| 色噜噜狠狠一区二区三区果冻| 91小视频免费观看| 91久久一区二区| 欧美高清视频一二三区| 日韩欧美中文一区| 久久久亚洲精品石原莉奈| 中文字幕av一区二区三区高| 国产精品久久久久久妇女6080| 中文字幕二三区不卡| 亚洲人成在线观看一区二区| 一二三区精品视频| 天堂成人免费av电影一区| 日韩经典一区二区| 国产一区在线视频| 成人免费av网站| 91国内精品野花午夜精品| 欧美吞精做爰啪啪高潮| 日韩亚洲欧美成人一区| 久久久久综合网| 亚洲色图视频免费播放| 午夜精品福利一区二区三区av | 人人狠狠综合久久亚洲| 国产精品亚洲第一区在线暖暖韩国| 成人综合婷婷国产精品久久免费| 色婷婷综合久久久中文字幕| 欧美一级免费观看| 国产三级精品三级在线专区| 亚洲综合色在线| 激情小说亚洲一区| 色综合av在线| 精品国产乱码久久久久久牛牛 | 久久精品日产第一区二区三区高清版 | 丝袜亚洲另类丝袜在线| 久久99国产精品免费| 色综合中文字幕国产| 欧洲av一区二区嗯嗯嗯啊| 精品久久久久99| 亚洲午夜激情av| 成人中文字幕合集| 欧美日韩精品一区二区| 国产精品每日更新| 蜜乳av一区二区| 欧美色中文字幕| 国产精品理论片在线观看| 老司机免费视频一区二区| 99re8在线精品视频免费播放| 日韩欧美国产小视频| 一区二区三区电影在线播| 福利一区在线观看| 日韩欧美久久一区| 天天操天天干天天综合网| www.爱久久.com| 久久在线观看免费| 爽好久久久欧美精品| av成人免费在线| 国产喷白浆一区二区三区| 奇米精品一区二区三区在线观看一| www..com久久爱| 日韩一区日韩二区| 国产高清不卡二三区| 91精品国产综合久久福利软件| 亚洲综合在线电影| 92国产精品观看| 欧美激情在线一区二区| 韩国在线一区二区| 久久久蜜臀国产一区二区| 奇米精品一区二区三区四区| 欧美日韩三级一区| 亚洲成人午夜电影| 欧美日韩在线播| 一区二区三区蜜桃| 色一区在线观看| 一区二区高清在线| 欧美视频三区在线播放| 午夜在线电影亚洲一区| 欧美综合视频在线观看| 一区二区三区在线视频免费| 9人人澡人人爽人人精品|