Interface ICustomPrinter

  • All Known Implementing Classes:
    Ascii, CustomPrinter, Html

    public interface ICustomPrinter
    Interface used for the customisation of the printing of Java Objects.
    Author:
    Erwan Bocher (CNRS), Sylvain PALOMINOS (UBS 2019)
    • Method Detail

      • startTable

        void startTable​(int columnWidth,
                        int columnCount)
        Start the drawing of a table.
        Parameters:
        columnWidth - Width in character number of a single column.
        columnCount - Count of column.
      • endTable

        void endTable()
        End the table drawing.
      • appendTableLineSeparator

        void appendTableLineSeparator()
        Append a line separator to the builder.
      • appendTableValue

        void appendTableValue​(Object value)
        Add a single value to the table. Linebreak are automatically generated once the column count is reached.
        Parameters:
        value - Value to add to the table.
      • appendTableValue

        void appendTableValue​(Object value,
                              ICustomPrinter.CellPosition position)
        Add a single value to the table. Linebreak are automatically generated once the column count is reached.
        Parameters:
        value - Value to add to the table.
      • appendTableHeaderValue

        void appendTableHeaderValue​(Object value,
                                    ICustomPrinter.CellPosition position)
        Add a header value to the table. Linebreak are automatically generated once the column count is reached.
        Parameters:
        value - Header value to add to the table.
      • appendTableTitle

        void appendTableTitle​(Object title)
        Add a title to the table.
        Parameters:
        title - Not null title to add to the table.
      • appendValue

        void appendValue​(Object value)
        Add a simple value. If a table has been started, use appendTableValue(Object).
        Parameters:
        value - Value to add.
      • toString

        String toString()
        Return the not null string representation of the data contained by the ICustomPrinter in its specific format.
        Overrides:
        toString in class Object
        Returns:
        The not null string representation of the data contained by the ICustomPrinter
      • appendText

        void appendText​(String text)