org.nhindirect.config.manager.printers
Class AbstractRecordPrinter<T>

java.lang.Object
  extended by org.nhindirect.config.manager.printers.AbstractRecordPrinter<T>
All Implemented Interfaces:
RecordPrinter<T>
Direct Known Subclasses:
CertRecordPrinter, PolicyGroupPrinter, PolicyPrinter, PolicyUsagePrinter

public abstract class AbstractRecordPrinter<T>
extends Object
implements RecordPrinter<T>


Nested Class Summary
protected static class AbstractRecordPrinter.ReportColumn
           
 
Field Summary
protected  Collection<AbstractRecordPrinter.ReportColumn> reportColumns
           
protected  int tableWidth
           
 
Constructor Summary
AbstractRecordPrinter(int tableWidth, Collection<AbstractRecordPrinter.ReportColumn> reportColumns)
           
 
Method Summary
protected  String getColumnValue(AbstractRecordPrinter.ReportColumn column, T record)
           
protected  void printHeader()
           
 void printRecord(T record)
           
protected  void printRecordInternal(T record)
           
 void printRecords(Collection<T> records)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reportColumns

protected final Collection<AbstractRecordPrinter.ReportColumn> reportColumns

tableWidth

protected final int tableWidth
Constructor Detail

AbstractRecordPrinter

public AbstractRecordPrinter(int tableWidth,
                             Collection<AbstractRecordPrinter.ReportColumn> reportColumns)
Method Detail

printRecord

public void printRecord(T record)
Specified by:
printRecord in interface RecordPrinter<T>

printRecords

public void printRecords(Collection<T> records)
Specified by:
printRecords in interface RecordPrinter<T>

printRecordInternal

protected void printRecordInternal(T record)

getColumnValue

protected String getColumnValue(AbstractRecordPrinter.ReportColumn column,
                                T record)

printHeader

protected void printHeader()


Copyright © 2015. All Rights Reserved.