Class CustomPrinter

    • Field Detail

      • columnWidth

        protected int columnWidth
        Width in character number of a single column
      • columnCount

        protected int columnCount
        Count of column
      • isDrawingTable

        protected boolean isDrawingTable
        True of a table is currently drawn, false otherwise
      • columnIndex

        protected int columnIndex
        Current column index
    • Constructor Detail

      • CustomPrinter

        protected CustomPrinter​(StringBuilder builder)
        Main constructor.
        Parameters:
        builder - StringBuilder used for the string building.
    • Method Detail

      • startTable

        public void startTable​(int columnWidth,
                               int columnCount)
        Description copied from interface: ICustomPrinter
        Start the drawing of a table.
        Specified by:
        startTable in interface ICustomPrinter
        Parameters:
        columnWidth - Width in character number of a single column.
        columnCount - Count of column.
      • appendTableValue

        public void appendTableValue​(Object value)
        Description copied from interface: ICustomPrinter
        Add a single value to the table. Linebreak are automatically generated once the column count is reached.
        Specified by:
        appendTableValue in interface ICustomPrinter
        Parameters:
        value - Value to add to the table.