Class TableBuilder.Borders
java.lang.Object
com.jagrosh.jdautilities.commons.utils.TableBuilder.Borders
- Enclosing class:
TableBuilder
A data class whose instances store the characters needed to create a table with the enclosing
Instances can be created via the factory methods provided by this class.
Some default instances are already given as
TableBuilder
.
Instances can be created via the factory methods provided by this class.
Some default instances are already given as
public static final
fields.
All of them use box drawing characters.-
Field Summary
Modifier and TypeFieldDescriptionfinal String
final String
final String
final String
final String
final String
static final TableBuilder.Borders
An instance that can be used for framed tables without any special characters for headers or row name columns.static final TableBuilder.Borders
An instance that can be used for framed tables with a header row, for it provides a special delimiter for the first row.static final TableBuilder.Borders
An instance that can be used for tables without a frame that have a header, for this provides a special delimiter for the first row.static final TableBuilder.Borders
An instance that can be used for framed tables with a header row and a columns with row names, for it provides special delimiters for the first row and column.static final TableBuilder.Borders
An instance that can be used for tables without a frame that have a header row and a row name column, for this provides special delimiters for the first row and column.final String
final String
final String
final String
final String
final String
final String
final String
final String
final String
static final TableBuilder.Borders
An instance that can be used for plain tables without a frame that do not have any special delimiters for headers or row name columns.final String
final String
static final String
final String
final String
final String
final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic TableBuilder.Borders
newFrameBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing and don't have any special characters for headers or row names.static TableBuilder.Borders
newHeaderFrameBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing and special characters for a header row.static TableBuilder.Borders
newHeaderPlainBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter) The factory method forBorders
instances that should not support framing but special characters for a header row.static TableBuilder.Borders
newHeaderRowNamesFrameBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String firstColumnDelimiter, String firstColumnCrossDelimiter, String firstColumnUpperIntersection, String firstColumnLowerIntersection, String headerColumnCrossDelimiter, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing as well as special characters for a header row and a row name column.static TableBuilder.Borders
newHeaderRowNamesPlainBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter, String firstColumnDelimiter, String firstColumnCrossDelimiter, String headerColumnCrossDelimiter) The factory method forBorders
instances that should not support framing but special characters for a header row and a row name column.static TableBuilder.Borders
newPlainBorders
(String rowDelimiter, String columnDelimiter, String crossDelimiter) The factory method forBorders
instances that should not support framing and no special characters for a header row or a row name column.
-
Field Details
-
HEADER_ROW_FRAME
An instance that can be used for framed tables with a header row and a columns with row names, for it provides special delimiters for the first row and column. -
HEADER_FRAME
An instance that can be used for framed tables with a header row, for it provides a special delimiter for the first row. -
FRAME
An instance that can be used for framed tables without any special characters for headers or row name columns. -
HEADER_ROW_PLAIN
An instance that can be used for tables without a frame that have a header row and a row name column, for this provides special delimiters for the first row and column. -
HEADER_PLAIN
An instance that can be used for tables without a frame that have a header, for this provides a special delimiter for the first row. -
PLAIN
An instance that can be used for plain tables without a frame that do not have any special delimiters for headers or row name columns. -
UNKNOWN
- See Also:
-
rowDelimiter
-
columnDelimiter
-
crossDelimiter
-
leftIntersection
-
rightIntersection
-
upperIntersection
-
lowerIntersection
-
upLeftCorner
-
upRightCorner
-
lowLeftCorner
-
lowRightCorner
-
headerDelimiter
-
headerCrossDelimiter
-
headerLeftIntersection
-
headerRightIntersection
-
firstColumnDelimiter
-
firstColumnCrossDelimiter
-
firstColumnUpperIntersection
-
firstColumnLowerIntersection
-
headerColumnCrossDelimiter
-
horizontalOutline
-
verticalOutline
-
-
Method Details
-
newHeaderRowNamesFrameBorders
public static TableBuilder.Borders newHeaderRowNamesFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String firstColumnDelimiter, String firstColumnCrossDelimiter, String firstColumnUpperIntersection, String firstColumnLowerIntersection, String headerColumnCrossDelimiter, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing as well as special characters for a header row and a row name column.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table crossleftIntersection
- The character for frame intersections at the leftrightIntersection
- The character for frame intersections at the rightupperIntersection
- The character for upper frame intersectionslowerIntersection
- The character for lower frame intersectionsupLeftCorner
- The character for the upper left frame cornerupRightCorner
- The character for the upper right frame cornerlowLeftCorner
- The character for the lower left frame cornerlowRightCorner
- The character for the lower right frame cornerheaderDelimiter
- The normal character to be placed between the first row and the second rowheaderCrossDelimiter
- The character to be placed where the header delimiter and the column delimiters crossheaderLeftIntersection
- The character to be placed at the very left of the header delimiterheaderRightIntersection
- The character to be placed at the very right of the header delimiterfirstColumnDelimiter
- The normal character to be placed between the first and the second columnfirstColumnCrossDelimiter
- The character to be placed after the first column where the row delimiters are crossedfirstColumnUpperIntersection
- The character to be placed at the very top of the first column delimiterfirstColumnLowerIntersection
- The character to be placed at the very bottom of the first column delimiterheaderColumnCrossDelimiter
- The character to be placed at the intersection first row x first columnhorizontalOutline
- The character to use for the upper and lower frame outlineverticalOutline
- The character to use for the left and right frame outline- Returns:
- Borders instance
-
newHeaderFrameBorders
public static TableBuilder.Borders newHeaderFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String headerDelimiter, String headerCrossDelimiter, String headerLeftIntersection, String headerRightIntersection, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing and special characters for a header row.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table crossleftIntersection
- The character for frame intersections at the leftrightIntersection
- The character for frame intersections at the rightupperIntersection
- The character for upper frame intersectionslowerIntersection
- The character for lower frame intersectionsupLeftCorner
- The character for the upper left frame cornerupRightCorner
- The character for the upper right frame cornerlowLeftCorner
- The character for the lower left frame cornerlowRightCorner
- The character for the lower right frame cornerheaderDelimiter
- The normal character to be placed between the first row and the second rowheaderCrossDelimiter
- The character to be placed where the header delimiter and the column delimiters crossheaderLeftIntersection
- The character to be placed at the very left of the header delimiterheaderRightIntersection
- The character to be placed at the very right of the header delimiterhorizontalOutline
- The character to use for the upper and lower frame outlineverticalOutline
- The character to use for the left and right frame outline- Returns:
- Borders instance
-
newFrameBorders
public static TableBuilder.Borders newFrameBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String leftIntersection, String rightIntersection, String upperIntersection, String lowerIntersection, String upLeftCorner, String upRightCorner, String lowLeftCorner, String lowRightCorner, String horizontalOutline, String verticalOutline) The factory method forBorders
instances that should support framing and don't have any special characters for headers or row names.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table crossleftIntersection
- The character for frame intersections at the leftrightIntersection
- The character for frame intersections at the rightupperIntersection
- The character for upper frame intersectionslowerIntersection
- The character for lower frame intersectionsupLeftCorner
- The character for the upper left frame cornerupRightCorner
- The character for the upper right frame cornerlowLeftCorner
- The character for the lower left frame cornerlowRightCorner
- The character for the lower right frame cornerhorizontalOutline
- The character to use for the upper and lower frame outlineverticalOutline
- The character to use for the left and right frame outline- Returns:
- Borders instance
-
newHeaderRowNamesPlainBorders
public static TableBuilder.Borders newHeaderRowNamesPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter, String firstColumnDelimiter, String firstColumnCrossDelimiter, String headerColumnCrossDelimiter) The factory method forBorders
instances that should not support framing but special characters for a header row and a row name column.Warning: using this or the other plain Borders for a framed table will not lead to a satisfying result, since all the framing characters are
unknown unicode characters
here.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table crossheaderDelimiter
- The normal character to be placed between the first row and the second rowheaderCrossDelimiter
- The character to be placed where the header delimiter and the column delimiters crossfirstColumnDelimiter
- The normal character to be placed between the first and the second columnfirstColumnCrossDelimiter
- The character to be placed after the first column where the row delimiters are crossedheaderColumnCrossDelimiter
- The character to be placed at the intersection first row x first column- Returns:
- Borders instance
-
newHeaderPlainBorders
public static TableBuilder.Borders newHeaderPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter, String headerDelimiter, String headerCrossDelimiter) The factory method forBorders
instances that should not support framing but special characters for a header row.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table crossheaderDelimiter
- The normal character to be placed between the first row and the second rowheaderCrossDelimiter
- The character to be placed where the header delimiter and the column delimiters cross- Returns:
- Borders instance
-
newPlainBorders
public static TableBuilder.Borders newPlainBorders(String rowDelimiter, String columnDelimiter, String crossDelimiter) The factory method forBorders
instances that should not support framing and no special characters for a header row or a row name column.- Parameters:
rowDelimiter
- The character used to separate normal rows from each othercolumnDelimiter
- The character used to separate normal columns form each othercrossDelimiter
- The character to be placed where the vertical and horizontal lines inside the table cross- Returns:
- Borders instance
-