Class TextUtil


  • public final class TextUtil
    extends java.lang.Object
    Some utilities for display text tables with aligning.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void appendField​(java.lang.StringBuilder out, java.lang.String data, int colSize, boolean alignRight)
      Output field with specified length.
      static java.lang.String showTextTable​(java.lang.String[] columnHeaders, java.lang.String[][] table, boolean[] alignRight)
      Draw text table with columns align.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • showTextTable

        public static java.lang.String showTextTable​(java.lang.String[] columnHeaders,
                                                     java.lang.String[][] table,
                                                     boolean[] alignRight)
        Draw text table with columns align.
        Parameters:
        columnHeaders - column headers
        table - table data
        Returns:
        text
      • appendField

        public static void appendField​(java.lang.StringBuilder out,
                                       java.lang.String data,
                                       int colSize,
                                       boolean alignRight)
        Output field with specified length.
        Parameters:
        out - output stream
        data - field data
        colSize - field size