Package org.epics.util.text
Class NumberFormats
- java.lang.Object
-
- org.epics.util.text.NumberFormats
-
public final class NumberFormats extends Object
Factory class for frequently used NumberFormats.- Author:
- carcassi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NumberFormat
precisionFormat(int precision)
Returns a number format that formats a number with the given number of precision digits.static NumberFormat
printfFormat(String format)
static NumberFormat
toStringFormat()
Returns the NumberFormat that uses the standard text representation (toString) for numbers.
-
-
-
Method Detail
-
precisionFormat
public static NumberFormat precisionFormat(int precision)
Returns a number format that formats a number with the given number of precision digits. Parsing is not currently supported.- Parameters:
precision
- number of digits past the decimal point- Returns:
- a number format
-
toStringFormat
public static NumberFormat toStringFormat()
Returns the NumberFormat that uses the standard text representation (toString) for numbers. Parsing is not currently supported.- Returns:
- a number format
-
printfFormat
public static NumberFormat printfFormat(String format)
-
-