public class WidthLongestWordMaxCol extends Object implements V2_Width
| Modifier and Type | Field and Description |
|---|---|
protected int |
max
The maximum width of all columns.
|
protected int[] |
maxAr
The maximum width per individual column.
|
| Constructor and Description |
|---|
WidthLongestWordMaxCol(int max)
Creates a new width object.
|
WidthLongestWordMaxCol(int[] maxAr)
Creates a new width object
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getColumnWidths(V2_AsciiTable table)
Returns the width of each column in an array, column one being [0] and so on.
|
protected int max
protected int[] maxAr
public WidthLongestWordMaxCol(int max)
max - the maximum width of each column, cannot be smaller than 3IllegalArgumentException - if the parameter was less than 3public WidthLongestWordMaxCol(int[] maxAr)
maxAr - the maximum width per individual column, entries of -1 will be ignored and the longest word being usedIllegalArgumentException - if the array had width of less than 3 or was nullpublic int[] getColumnWidths(V2_AsciiTable table)
V2_WidthgetColumnWidths in interface V2_Widthtable - the table with all content, important for some width calculationsCopyright © 2010–2015. All rights reserved.