Package 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
Constructors Constructor Description PercentageFormatter()
Create a PercentageFormatter that formats to 1 decimal placePercentageFormatter(int dp)
Create a PercentageFormatter that formats to the specified number of decimal places
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(double in)
Return a String that is the formatted version of the input parameter.-
Methods inherited from class org.faceless.graph.formatter.Formatter
fixMinMax, isDiscrete, setDensity, setFixedEnds, steps
-
-
-
-
Constructor Detail
-
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
-
-