public class Format extends Object
Constructor and Description |
---|
Format() |
Modifier and Type | Method and Description |
---|---|
static String |
format(int numFracDigits,
double f,
String col) |
static String |
format(int numFracDigits,
float f,
String col)
Padd a number from left.
|
static String |
format(int n,
String col)
Pad a number from left.
|
static String |
format(String s,
String col)
Pad a string from right.
|
static String |
formatPaddLeft(String s,
String col)
Pad a string from left.
|
static String |
formatPaddRight(int numFracDigits,
double f,
String col) |
static String |
formatPaddRight(int numFracDigits,
float f,
String col)
Pad a number from right.
|
public static String format(int numFracDigits, float f, String col)
numFracDigits
- number of digits in fraction part - must be 0 or 1 or 2.f
- number to be formatted.col
- column name (used for deciding on length).public static String formatPaddRight(int numFracDigits, float f, String col)
numFracDigits
- number of digits in fraction part - must be 0 or 1 or 2.f
- number to be formatted.col
- column name (used for deciding on length).public static String format(int n, String col)
n
- number to be formatted.col
- column name (used for deciding on length).public static String format(String s, String col)
s
- string to be formatted.col
- column name (used for deciding on length).