|
|
|||||||||||||||||||||
| 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.PrettyPrinter
public class PrettyPrinter
Class for formatting output into table.
| Field Summary | |
|---|---|
private int[] |
columnWidth
provides the column width for each column |
static String |
NEWLINE
The newline-String dependent on the system. |
private String |
separator
provides a separator to separate different columns (could be empty String) |
| Constructor Summary | |
|---|---|
PrettyPrinter(int[] columnWidth,
String separator)
Provides a PrettyPrinter with specified columnWidth and specified separator. |
|
| Method Summary | |
|---|---|
Vector<String> |
breakLine(String line,
int column)
Breaks a line at near line-end spaces fitting to width of columnWidth[column]. |
String |
formattedLine(String[] lineEntries,
char fillCharacter)
Formats given lineEntries into formatted tableLine, filled with specified fillCharacter. |
String |
formattedLine(String[] lineEntries,
char fillCharacter,
boolean[] leftBounded)
Formats given lineEntries into formatted tableLine, filled with specified fillCharacter. |
private String |
splitAtLastBlank(String s,
int column)
Splits the specified string at the last blank before columnWidth[column]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NEWLINE
private int[] columnWidth
private String separator
| Constructor Detail |
|---|
public PrettyPrinter(int[] columnWidth,
String separator)
columnWidth - the column width for each columnseparator - a separator to separate different columns (could be empty
String)| Method Detail |
|---|
public String formattedLine(String[] lineEntries,
char fillCharacter)
lineEntries - the entries to be written into tablefillCharacter - char to fill the table line with
public String formattedLine(String[] lineEntries,
char fillCharacter,
boolean[] leftBounded)
lineEntries - the entries to be written into tablefillCharacter - char to fill the table line withleftBounded - specifies, if column is leftBounded
public Vector<String> breakLine(String line,
int column)
line - the line to breakcolumn - the index of column in columnWidth
private String splitAtLastBlank(String s,
int column)
s - the string to be splittedcolumn - the index of column in columnWidth
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||