Package org.springframework.shell.table
Class KeyValueSizeConstraints
java.lang.Object
org.springframework.shell.table.KeyValueSizeConstraints
- All Implemented Interfaces:
SizeConstraints
A SizeConstraints implementation that is tailored to rendering a series
of key = value pairs. Computes extents so that equal signs (or any other
configurable delimiter) line up vertically.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.table.SizeConstraints
SizeConstraints.Extent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
KeyValueSizeConstraints
-
-
Method Details
-
width
- Specified by:
width
in interfaceSizeConstraints
- Parameters:
raw
- the raw String representation of the cell contents (may be reformatted later, eg wrapped)tableWidth
- the whole available width for the tablenbColumns
- the number of columns in the table- Returns:
- the minimum and maximum width of the cell, given its raw content.
-