Class NoWrapSizeConstraints

java.lang.Object
org.springframework.shell.table.NoWrapSizeConstraints
All Implemented Interfaces:
SizeConstraints

public class NoWrapSizeConstraints extends Object implements SizeConstraints
A sizing strategy that will impose the longest line width on cells.
  • Constructor Details

    • NoWrapSizeConstraints

      public NoWrapSizeConstraints()
  • Method Details

    • width

      public SizeConstraints.Extent width(String[] raw, int tableWidth, int nbColumns)
      Specified by:
      width in interface SizeConstraints
      Parameters:
      raw - the raw String representation of the cell contents (may be reformatted later, eg wrapped)
      tableWidth - the whole available width for the table
      nbColumns - the number of columns in the table
      Returns:
      the minimum and maximum width of the cell, given its raw content.