Example usage for java.util Currency toString

List of usage examples for java.util Currency toString

Introduction

In this page you can find the example usage for java.util Currency toString.

Prototype

@Override
public String toString() 

Source Link

Document

Returns the ISO 4217 currency code of this currency.

Usage

From source file:Main.java

public static void main(String[] args) {

    // create a currency with specified currency code
    Currency curr = Currency.getInstance("USD");

    System.out.println(curr.toString());
}

From source file:Main.java

@TargetApi(Build.VERSION_CODES.KITKAT)
public static String[] get_Currency_Name_And_Currency_Code(String iso2) {
    String[] str = new String[2];
    Locale locale = new Locale("", iso2);
    Currency currency = Currency.getInstance(locale);
    str[0] = currency.getDisplayName(Locale.ENGLISH);
    str[1] = currency.toString();
    return str;// ww w . j  a  v a2 s .  com

}

From source file:com.mtgox.api.MtGox.java

/**
*
* returns the string used to get the Ticker
* @return the string you're searching for;)
*///from   ww w .ja v a 2s  .  co m
private String getTickerPath(Currency cur, boolean fast) {
    return "BTC" + cur.toString() + "/MONEY/TICKER" + (fast ? "_FAST" : "");
}

From source file:org.mobicents.servlet.restcomm.http.converter.AbstractConverter.java

protected void writePriceUnit(final Currency priceUnit, final JsonObject object) {
    if (priceUnit != null) {
        object.addProperty("price_unit", priceUnit.toString());
    } else {/*from w  ww  . ja v a2s.  c o  m*/
        object.add("price_unit", JsonNull.INSTANCE);
    }
}

From source file:org.mobicents.servlet.restcomm.http.converter.AbstractConverter.java

protected void writePriceUnit(final Currency priceUnit, final HierarchicalStreamWriter writer) {
    writer.startNode("PriceUnit");
    if (priceUnit != null) {
        writer.setValue(priceUnit.toString());
    }//from  w  w  w.ja v a 2 s.  c  om
    writer.endNode();
}