PrettyDisplayUtils { public static String displayHeadline(String head, Character padChar) { String ret = " " + head + " "; int paddingLength = (DEFAULT_LINE_WIDTH - ret.length()) / 2; ret = StringUtils.leftPad(ret, ret.length() + paddingLength, padChar); ret = StringUtils.rightPad(ret, ret.length() + paddingLength, padChar); ret += "\n"; return ret; }  static String display(T v); static String display(T v, boolean useRawDoubleFormat); static String displayDouble(double v, String format); static String displayDouble(double v, String format, boolean useRawDoubleFormat); static String displayDouble(double v); static String displayDouble(double v, boolean useRawDoubleFormat); static String displayList(List<T> list, int numEdgeItems, boolean linebreak); static String displayList(List<T> list, boolean linebreak); static String displayList(List<T> list); static String displayDenseVector(DenseVector dv); static String displayDenseMatrix(DenseMatrix dm); static String displayMap(Map<?, ?> m, int numEdgeItems, boolean linebreak); static String displayMap(Map<?, ?> m); static String displayTable(T[][] table, int nRows, int nCols,
                                          String[] rowNames, String[] colNames, String cornerName,
                                          int nRowEdgeItems, int nColEdgeItems); static String displayTable(T[][] table, int nRows, int nCols,
                                          String[] rowNames, String[] colNames, String cornerName,
                                          int nRowEdgeItems, int nColEdgeItems,
                                          boolean useRawDoubleFormat); static String displayTable(T[][] table, int nRows, int nCols,
                                          String[] rowNames, String[] colNames, String cornerName); static String indentLines(String text, int indentSize); static String prependStringWithIndent(String text, String s); static String displayHeadline(String head, Character padChar);  }
@Test public void testHeadline() { System.out.println(PrettyDisplayUtils.displayHeadline("IMPORTANCE", '-')); System.out.println(PrettyDisplayUtils.displayHeadline("convergence info", '=')); }