org.faceless.graph.formatter
Class PercentageFormatter
java.lang.Object
org.faceless.graph.formatter.Formatter
org.faceless.graph.formatter.PercentageFormatter
public class PercentageFormatter
- extends Formatter
A formatter that returns it's input formatted as a percentage
Constructor Summary |
PercentageFormatter()
Create a PercentageFormatter that formats to 1 decimal place |
PercentageFormatter(int dp)
Create a PercentageFormatter that formats to the specified number
of decimal places |
Method Summary |
String |
format(double in)
Return a String that is the formatted version of the input
parameter. |
PercentageFormatter
public PercentageFormatter()
- Create a PercentageFormatter that formats to 1 decimal place
PercentageFormatter
public PercentageFormatter(int dp)
- Create a PercentageFormatter that formats to the specified number
of decimal places
- Parameters:
dp
- the number of decimal places
format
public String format(double in)
- Description copied from class:
Formatter
- Return a String that is the formatted version of the input
parameter.
- Specified by:
format
in class Formatter
Copyright © 2001-2012 Big Faceless Organization