public final class RowPadding extends Object
| Modifier and Type | Field and Description |
|---|---|
static RowPadding |
NONE
Constant for no padding.
|
| Constructor and Description |
|---|
RowPadding(int beginning,
int end)
Creates information about padding a row.
|
| Modifier and Type | Method and Description |
|---|---|
static RowPadding |
centred(int cells,
int columns,
boolean whenOddPutMoreToBeginning)
Creates
RowPadding where given number of cells are centred in given number of columns (optionally putting one odd cell to the beginning). |
boolean |
equals(Object o) |
int |
getBeginning()
Returns the number of empty cells at the beginning of the row.
|
int |
getEnd()
Returns the number of empty cells at the end of the row.
|
int |
hashCode() |
public static final RowPadding NONE
public RowPadding(int beginning,
int end)
beginning - Number of empty cells at the beginning of the row. Must not be a negative number,end - Number of empty cells at the end of the row. Must not be a negative number.IllegalArgumentException - When either beginning or end are negative.public static RowPadding centred(int cells, int columns, boolean whenOddPutMoreToBeginning)
RowPadding where given number of cells are centred in given number of columns (optionally putting one odd cell to the beginning).cells - Number of cells to split. If not less than columns, NONE will be returned.columns - Number of columns to fill. Must be a positive number.whenOddPutMoreToBeginning - When there is odd number of empty cells to distribute and this parameter is true, extra empty cell will be added to the beginning. Otherwise, it will be added to the end if needed.public int getBeginning()
public int getEnd()
Copyright © 2024 Miki. All rights reserved.