|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.output.Format
public class Format
Provides several methods for formatting objects for print purposes.
Field Summary | |
---|---|
static NumberFormat |
NF2
Number Formatter for output purposes. |
static NumberFormat |
NF4
|
static NumberFormat |
NF8
|
Constructor Summary | |
---|---|
Format()
|
Method Summary | |
---|---|
static String |
blanks(int n)
Returns a string with the specified number of blanks. |
static String |
format(double[] d)
Formats the double array d with ', ' as separator. |
static String |
format(double[] d,
int digits)
Formats the double array d with ', ' as separator and with the specified fraction digits. |
static String |
format(double[] d,
String sep)
Formats the double array d with the specified separator. |
static String |
format(double[] d,
String sep,
int digits)
Formats the double array d with the specified separator and the specified fraction digits. |
static String |
format(double d,
int digits)
Formats the double d with the specified fraction digits. |
static String |
format(HyperBoundingBox box,
int digits)
Formats the hyper bounding box with ', ' as separator and with the specified fraction digits. |
static String |
format(int input,
int maximum)
Returns an integer-string for the given input, that has as many leading zeros as to match the length of the specified maximum. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final NumberFormat NF2
public static final NumberFormat NF4
public static final NumberFormat NF8
Constructor Detail |
---|
public Format()
Method Detail |
---|
public static String format(double d, int digits)
d
- the double array to be formatteddigits
- the number of fraction digits
public static String format(double[] d)
d
- the double array to be formatted
public static String format(double[] d, String sep, int digits)
d
- the double array to be formattedsep
- the seperator between the single values of the double array,
e.g. ','digits
- the number of fraction digits
public static String format(double[] d, String sep)
d
- the double array to be formattedsep
- the seperator between the single values of the double array,
e.g. ','
public static String format(double[] d, int digits)
d
- the double array to be formatteddigits
- the number of fraction digits
public static String format(int input, int maximum)
input
- an integer to be formattedmaximum
- the maximum to adapt the format to
public static String format(HyperBoundingBox box, int digits)
box
- the box to be formatted
public static String blanks(int n)
n
- the nuber of blanks
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |