cakoose.util.text
Class SimpleTextTable

java.lang.Object
  extended by cakoose.util.text.SimpleTextTable

public class SimpleTextTable
extends Object

For printing out simple text tables. - Sets the column width to accomodate the widest entry. - Puts any given prefix and suffix string around each.


Nested Class Summary
static class SimpleTextTable.ColSpec
           
static class SimpleTextTable.HAlign
           
 
Constructor Summary
SimpleTextTable(Collection<SimpleTextTable.ColSpec> columns)
           
SimpleTextTable(SimpleTextTable.ColSpec... columns)
           
 
Method Summary
 void addDivider(char c)
           
 void addMultilineRow(Collection<? extends Collection<String>> values)
           
 void addMultilineRow(Collection<String>... values)
           
 void addRow(Collection<String> values)
           
 void addRow(String... values)
           
 void write(Writer w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTextTable

public SimpleTextTable(Collection<SimpleTextTable.ColSpec> columns)

SimpleTextTable

public SimpleTextTable(SimpleTextTable.ColSpec... columns)
Method Detail

addRow

public void addRow(Collection<String> values)

addRow

public void addRow(String... values)

addMultilineRow

public void addMultilineRow(Collection<? extends Collection<String>> values)

addMultilineRow

public void addMultilineRow(Collection<String>... values)

addDivider

public void addDivider(char c)

write

public void write(Writer w)
           throws IOException
Throws:
IOException