org.mentawai.formatter
Class NumberFormatter

java.lang.Object
  extended by org.mentawai.formatter.NumberFormatter
All Implemented Interfaces:
Formatter

public class NumberFormatter
extends Object
implements Formatter

Author:
Marvin Herman Froeder

Field Summary
static int CURRENCY
           
static int INTEGER
           
static int PERCENTAGE
           
static int REAL
           
 
Constructor Summary
NumberFormatter(int style)
           
NumberFormatter(String pattern)
           
NumberFormatter(String pattern, DecimalFormatSymbols symbols)
           
 
Method Summary
 String format(Object value, Locale loc)
          Formats an output object from this action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

REAL

public static final int REAL
See Also:
Constant Field Values

PERCENTAGE

public static final int PERCENTAGE
See Also:
Constant Field Values

CURRENCY

public static final int CURRENCY
See Also:
Constant Field Values
Constructor Detail

NumberFormatter

public NumberFormatter(int style)
Parameters:
style -

NumberFormatter

public NumberFormatter(String pattern)

NumberFormatter

public NumberFormatter(String pattern,
                       DecimalFormatSymbols symbols)
Method Detail

format

public String format(Object value,
                     Locale loc)
Description copied from interface: Formatter
Formats an output object from this action.

Specified by:
format in interface Formatter
Parameters:
value - The value to format
loc - The locale to use (if needed)
Returns:
The value formatted to a String


Copyright © 2013. All Rights Reserved.