|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.func.Formats
public class Formats
Functions for formatting numeric values.
Method Summary | |
---|---|
static String |
formatDecimal(double value,
int dp)
Turns a floating point value into a string with a given number of decimal places using standard settings. |
static String |
formatDecimal(double value,
String format)
Turns a floating point value into a formatted string using standard settings. |
static String |
formatDecimalLocal(double value,
int dp)
Turns a floating point value into a string using current locale settings. |
static String |
formatDecimalLocal(double value,
String format)
Turns a floating point value into a formatted string using current locale settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String formatDecimal(double value, int dp)
value
- value to formatdp
- number of decimal places (digits after the decmal point)
public static String formatDecimalLocal(double value, int dp)
formatDecimal
function.
value
- value to formatdp
- number of decimal places (digits after the decmal point)
public static String formatDecimal(double value, String format)
format
string is as defined by Java's
java.text.DecimalFormat
class.
value
- value to formatformat
- format specifier
public static String formatDecimalLocal(double value, String format)
formatDecimal
function.
value
- value to formatformat
- format specifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |