本文整理了Java中java.util.Currency.toString()
方法的一些代码示例,展示了Currency.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Currency.toString()
方法的具体详情如下:
包路径:java.util.Currency
类名称:Currency
方法名:toString
[英]Returns this currency's ISO 4217 currency code.
[中]返回此货币的ISO 4217货币代码。
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public String marshal(Currency currency) throws Exception {
return currency.toString();
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
public String toString() {
return value.toString();
}
代码示例来源:origin: ebean-orm/ebean
@Override
public String formatValue(Currency v) {
return v.toString();
}
代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base
/**
* Returns the ISO 4217 code for this currency.
* @stable ICU 2.2
*/
public String toString() {
return currency.toString();
}
代码示例来源:origin: com.abubusoft/kripton-core
/**
* Write.
*
* @param value the value
* @return the string
*/
public static String write(Currency value) {
if (value==null) return null;
return value.toString();
}
代码示例来源:origin: xcesco/kripton
/**
* Write.
*
* @param value the value
* @return the string
*/
public static String write(Currency value) {
if (value==null) return null;
return value.toString();
}
代码示例来源:origin: org.javamoney.moneta/moneta-core
/**
* Returns {@link #getCurrencyCode()}
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return baseCurrency.toString();
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base
/**
* Returns the ISO 4217 code for this currency.
* @stable ICU 2.2
*/
public String toString() {
return currency.toString();
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public String formatValue(Currency v) {
return v.toString();
}
代码示例来源:origin: io.ebean/ebean
@Override
public String formatValue(Currency v) {
return v.toString();
}
代码示例来源:origin: archfirst/bullsfirst-server-java
public String marshal(Currency val) throws Exception {
return val.toString();
}
}
代码示例来源:origin: org.restcomm/restcomm-connect.http
protected void writePriceUnit(final Currency priceUnit, final JsonObject object) {
if (priceUnit != null) {
object.addProperty("price_unit", priceUnit.toString());
} else {
object.add("price_unit", JsonNull.INSTANCE);
}
}
代码示例来源:origin: stackoverflow.com
String LocaleCountry = new Locale("en").getDefault().getCountry();
String LocaleLanguage = new Locale("en").getDefault().getLanguage();
String LocaleCurrency = new DecimalFormatSymbols().getCurrency().toString();
String LocaleShortDateTimePattern =new SimpleDateFormat().toPattern();
char LocaleDecimalSeparator = new DecimalFormatSymbols().getDecimalSeparator();
char LocaleThousandSeparator = new DecimalFormatSymbols().getGroupingSeparator();
String LocaleThousandGrouping =
String.format("%d;0", new DecimalFormat().getMaximumFractionDigits());
String LocaleNegativePrefix = new DecimalFormat().getNegativePrefix();
String LocaleNegativeSuffix =new DecimalFormat().getNegativeSuffix();
String Operator = Utils.getQwnername(context);
代码示例来源:origin: stackoverflow.com
Set<Currency> avail = Currency.getAvailableCurrencies();
for (Currency next : avail) {
System.out.println("----------------------------------------");
System.out.println("displayName="+next.getDisplayName());
System.out.println("currencyCode="+next.getCurrencyCode());
System.out.println("numericCode="+next.getNumericCode());
System.out.println("symbol="+next.getSymbol());
System.out.println("toString="+next.toString());
System.out.println("----------------------------------------");
}
代码示例来源:origin: stackoverflow.com
String currency = €;
String currencyCode = "";
for (Currency c : Currency.getAvailableCurrencies()) {
if (c.getSymbol().equals(currency)) {
currencyCode = c.toString();
}
}
代码示例来源:origin: stackoverflow.com
Set<Currency> currencies = Currency.getAvailableCurrencies();
for (Currency currency: currencies) {
System.out.printf("%s\t%s\t%s\n",currency.getDisplayName(), currency.getSymbol(), currency.toString());
// your code to check whether the symbol is not empty here
// add it to your String array or just directly use the
// CharSequences arrays for entries and values here.
}
代码示例来源:origin: org.restcomm/restcomm-connect.http
protected void writePriceUnit(final Currency priceUnit, final HierarchicalStreamWriter writer) {
writer.startNode("PriceUnit");
if (priceUnit != null) {
writer.setValue(priceUnit.toString());
}
writer.endNode();
}
代码示例来源:origin: boonproject/boon
public CharBuf addCurrency( Currency key ) {
if (currencyCache == null) {
currencyCache = new SimpleCache<> ( 100, CacheType.LRU );
}
char [] chars = currencyCache.get ( key );
if ( chars == null ) {
String str = '"' + key.toString() + '"';
chars = FastStringUtils.toCharArray ( str );
currencyCache.put ( key, chars );
}
add ( chars );
return this;
}
代码示例来源:origin: boonproject/boon
public CharBuf addCurrency( Currency key ) {
if (currencyCache == null) {
currencyCache = new SimpleCache<> ( 100, CacheType.LRU );
}
char [] chars = currencyCache.get ( key );
if ( chars == null ) {
String str = '"' + key.toString() + '"';
chars = FastStringUtils.toCharArray ( str );
currencyCache.put ( key, chars );
}
add ( chars );
return this;
}
代码示例来源:origin: com.github.advantageous/boon-reflekt
public CharBuf addCurrency( Currency key ) {
if (currencyCache == null) {
currencyCache = new SimpleLRUCache<> ( 100 );
}
char [] chars = currencyCache.get ( key );
if ( chars == null ) {
String str = '"' + key.toString() + '"';
chars = FastStringUtils.toCharArray ( str );
currencyCache.put ( key, chars );
}
add ( chars );
return this;
}
内容来源于网络,如有侵权,请联系作者删除!