com.sun.enterprise.admin.util
Class ColumnFormatter

java.lang.Object
  extended by com.sun.enterprise.admin.util.ColumnFormatter

public class ColumnFormatter
extends Object

Author:
Tom Mueller

Constructor Summary
ColumnFormatter()
           
ColumnFormatter(String[] headings)
           
 
Method Summary
 void addRow(Object[] values)
           
 List<Map<String,String>> getContent()
          Get the content of all rows along with the headings as a List of Map.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnFormatter

public ColumnFormatter(String[] headings)

ColumnFormatter

public ColumnFormatter()
Method Detail

addRow

public void addRow(Object[] values)
            throws IllegalArgumentException
Throws:
IllegalArgumentException

getContent

public List<Map<String,String>> getContent()
Get the content of all rows along with the headings as a List of Map. Note : If there are duplicate headings, latest entry and its value will take precedence. This can be useful in case the CLI is used by GUI via REST as GUI expects a List of Map.

Returns:
List of Map all entries in in the ColumnFormatter

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.