分享
 
 
 

java.util.Currency翻译

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

[/url] [url=file:///F:/资料/文字资料/j2sdk-1_4_2-doc/docs/api/overview-summary.html]Overview

Package

Class

Use

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Std. Ed. v1.4.2

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

java.util

Class Currencyjava.lang.Object

java.util.Currency

All Implemented Interfaces: Serializable public final class Currency extends Object implements SerializableRepresents a currency. Currencies are identified by their ISO 4217 currency codes. See the ISO 4217 maintenance agency for more information, including a table of currency codes. 代表货币。货币按照ISO 4217货币代码区分。更多信息参见ISO 4217 maintenance agency,包括货币代码表。

The class is designed so that there's never more than one Currency instance for any given currency. Therefore, there's no public constructor. You obtain a Currency instance using the getInstance methods. 该类被设计为对于任何给定的货币,只能得到一个Currency实例。因此,它没有公共的构造函数。 你可以使用getInstance方法获得Currency实例。

Since: 1.4 See Also: Serialized FormMethod Summary

String

getCurrencyCode()

Gets the ISO 4217 currency code of this currency. 获得当前货币的ISO 4217 货币代码。

int

getDefaultFractionDigits()

Gets the default number of fraction digits used with this currency. 获得当前货币小数部分的默认位数。

static Currency

getInstance(Locale locale)

Returns the Currency instance for the country of the given locale. 返回给定locale的国家的Currency实例。

static Currency

getInstance(String currencyCode)

Returns the Currency instance for the given currency code. 返回指定货币代码的Currency实例。

String

getSymbol()

Gets the symbol of this currency for the default locale. 获得默认locale的货币符号。

String

getSymbol(Locale locale)

Gets the symbol of this currency for the specified locale. 获得指定locale的货币符号。

String

toString()

Returns the ISO 4217 currency code of this currency. 返回当前货币的ISO 4217 货币代码。

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getInstancepublic static Currency getInstance(String currencyCode)

Returns the Currency instance for the given currency code. 返回指定货币代码的Currency实例。

Parameters: currencyCode - the ISO 4217 code of the currency 货币的ISO 4217代码 Returns: the Currency instance for the given currency code 指定货币代码的Currency实例 Throws: NullPointerException - if currencyCode is null 如果currencyCode为null时抛出 IllegalArgumentException - if currencyCode is not a supported ISO 4217 code. 如果currencyCode不受ISO 4217代码支持时抛出getInstancepublic static Currency getInstance(Locale locale)

Returns the Currency instance for the country of the given locale. The language and variant components of the locale are ignored. The result may vary over time, as countries change their currencies. For example, for the original member countries of the European Monetary Union, the method returns the old national currencies until December 31, 2001, and the Euro from January 1, 2002, local time of the respective countries. 返回给定locale的国家的Currency实例。locale的语言和不同组成被忽略。随着时间不同, 结果可能多种多样,因为国家会改变它们的货币。比如,对于欧盟的最初成员国而言, 该方法在2001年12月31日前,返回旧的国家货币,2002年1月1日以后,返回欧元(各国当地时间)。 The method returns null for territories that don't have a currency, such as Antarctica. 对于没有货币的领域,比如南极洲,方法返回null。

Parameters: locale - the locale for whose country a Currency instance is needed 需要给定国家的Currency实例的locale Returns: the Currency instance for the country of the given locale, or null 给定locale的国家的Currency实例,或者为null Throws: NullPointerException - if locale or its country code is null 如果locale或者它的国家代码为null时抛出 IllegalArgumentException - if the country of the given locale is not a supported ISO 3166 country code. 如果ISO 3166国家代码不支持给定locale的国家时抛出。getCurrencyCodepublic String getCurrencyCode()

Gets the ISO 4217 currency code of this currency. 获得当前货币的ISO 4217 货币代码。

Returns: the ISO 4217 currency code of this currency. 当前货币的ISO 4217 货币代码。getSymbolpublic String getSymbol()

Gets the symbol of this currency for the default locale. For example, for the US Dollar, the symbol is "$" if the default locale is the US, while for other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code is returned. 获得默认locale的货币符号。例如如果默认locale是US,对于美元,符号是“$”, 当然其他locale也可能是“US$”。如果不能确定符号,返回ISO 4217货币代码。

Returns: the symbol of this currency for the default locale 默认locale的货币符号getSymbolpublic String getSymbol(Locale locale)

Gets the symbol of this currency for the specified locale. For example, for the US Dollar, the symbol is "$" if the specified locale is the US, while for other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code is returned. 获得指定locale的货币符号。例如如果默认locale是US,对于美元,符号是“$”, 当然其他locale也可能是“US$”。如果不能确定符号,返回ISO 4217货币代码。

Parameters: locale - the locale for which a display name for this currency is needed 为货币显示名称需要的locale Returns: the symbol of this currency for the specified locale 指定locale的货币符号 Throws: NullPointerException - if locale is null 如果locale为null时抛出getDefaultFractionDigitspublic int getDefaultFractionDigits()

Gets the default number of fraction digits used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it's 0. In the case of pseudo-currencies, such as IMF Special Drawing Rights, -1 is returned. 获得当前货币小数部分的默认位数。例如,欧元的小数部分默认位数为2,而日元为0。 如果是假冒货币,比如IMF Special Drawing Rights,返回-1。

Returns: the default number of fraction digits used with this currency 当前货币小数部分的默认位数。toStringpublic String toString()

Returns the ISO 4217 currency code of this currency. 返回当前locale的货币符号。

Overrides: toString in class ObjectReturns: the ISO 4217 currency code of this currency 当前locale的货币符号[/url][url=file:///F:/资料/文字资料/j2sdk-1_4_2-doc/docs/api/overview-summary.html]Overview

Package

Class

Use

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Std. Ed. v1.4.2

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有