Example usage for java.text DecimalFormat getDecimalFormatSymbols

List of usage examples for java.text DecimalFormat getDecimalFormatSymbols

Introduction

In this page you can find the example usage for java.text DecimalFormat getDecimalFormatSymbols.

Prototype

public DecimalFormatSymbols getDecimalFormatSymbols() 

Source Link

Document

Returns a copy of the decimal format symbols, which is generally not changed by the programmer or user.

Usage

From source file:com.thomasokken.free42.Free42Activity.java

/**
 * shell_decimal_point()/*from  www.ja va 2  s .com*/
 * Returns 0 if the host's locale uses comma as the decimal separator;
 * returns 1 if it uses dot or anything else.
 * Used to initialize flag 28 on hard reset.
 */
public int shell_decimal_point() {
    DecimalFormat df = new DecimalFormat();
    DecimalFormatSymbols dfsym = df.getDecimalFormatSymbols();
    return dfsym.getDecimalSeparator() == ',' ? 0 : 1;
}