Class DebugAligner

java.lang.Object
org.springframework.shell.table.DebugAligner
All Implemented Interfaces:
Aligner

public class DebugAligner extends Object implements Aligner
A decorator Aligner that checks the Aligner invariants contract, useful for debugging.
  • Constructor Details

    • DebugAligner

      public DebugAligner(Aligner delegate)
  • Method Details

    • align

      public String[] align(String[] text, int cellWidth, int cellHeight)
      Description copied from interface: Aligner
      Perform text alignment, returning a String array that MUST contain cellHeight lines, each of which MUST be cellWidth chars in length.

      Input array is guaranteed to contain lines that have length equal to cellWidth. There is no guarantee on the input number of lines though.

      Specified by:
      align in interface Aligner
      Parameters:
      text - the text to align
      cellWidth - the width of of the table cell
      cellHeight - the height of the table cell
      Returns:
      the aligned text, in a cellHeight element array