Package org.springframework.shell.table
Interface Aligner
- All Known Implementing Classes:
DebugAligner
,KeyValueHorizontalAligner
,SimpleHorizontalAligner
,SimpleVerticalAligner
public interface Aligner
A strategy interface for performing text alignment.
-
Method Summary
-
Method Details
-
align
Perform text alignment, returning a String array that MUST containcellHeight
lines, each of which MUST becellWidth
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.- Parameters:
text
- the text to aligncellWidth
- the width of of the table cellcellHeight
- the height of the table cell- Returns:
- the aligned text, in a
cellHeight
element array
-