![]() |
SudokuFX
|
Represents a Sudoku grid with default values, current values, and the number of possibilities. More...
Collaboration diagram for fr.softsf.sudokufx.model.Grid:Classes | |
| class | GridBuilder |
Builder class for creating Grid instances. More... | |
Public Member Functions | |
| Grid (Long gridid, @Nonnull @NotNull String defaultgridvalue, @Nonnull @NotNull String gridvalue, byte possibilities) | |
| Full constructor to initialize a grid with all fields. | |
| boolean | equals (Object obj) |
| Compares this grid with another object for equality based on all fields. | |
| String | getDefaultgridvalue () |
| Returns the default grid values. | |
| Long | getGridid () |
| Returns the unique identifier of the grid. | |
| String | getGridvalue () |
| Returns the current grid values. | |
| byte | getPossibilities () |
| Returns the percentage of possibilities for this grid. | |
| int | hashCode () |
| Computes the hash code based on all fields. | |
| void | setDefaultgridvalue (@Nonnull String defaultgridvalue) |
| Sets the default grid values. | |
| void | setGridvalue (@Nonnull String gridvalue) |
| Sets the current grid values. | |
| void | setPossibilities (byte possibilities) |
| Sets the percentage of possibilities for this grid. | |
| String | toString () |
| Returns a string representation of the grid. | |
Static Public Member Functions | |
| static GridBuilder | builder () |
Creates a new GridBuilder for fluent construction of Grid instances. | |
Protected Member Functions | |
| Grid () | |
| Protected default constructor for JPA. | |
Static Private Member Functions | |
| static String | validateDefaultgridvalue (String defaultgridvalue) |
| Validates that the default grid value is not null. | |
| static String | validateGridvalue (String gridvalue) |
| Validates that the grid value is not null. | |
Private Attributes | |
| String | defaultgridvalue = EMPTY_GRID |
| Default values of the grid (length up to 81). | |
| Long | gridid |
| Unique identifier of the grid (primary key). | |
| String | gridvalue = EMPTY_GRID |
| Current values of the grid (length up to 810). | |
| byte | possibilities |
| Percentage of possibilities for this grid, between 0 and 100. | |
Static Private Attributes | |
| static final String | DEFAULTGRIDVALUE_MUST_NOT_BE_NULL |
| static final String | EMPTY_GRID = "" |
| static final String | GRIDVALUE_MUST_NOT_BE_NULL = "gridvalue must not be null" |
Represents a Sudoku grid with default values, current values, and the number of possibilities.
Provides getters, setters, validation, and a builder for fluent construction.
|
protected |
Protected default constructor for JPA.
Here is the call graph for this function:| fr.softsf.sudokufx.model.Grid.Grid | ( | Long | gridid, |
| @Nonnull @NotNull String | defaultgridvalue, | ||
| @Nonnull @NotNull String | gridvalue, | ||
| byte | possibilities ) |
Full constructor to initialize a grid with all fields.
| gridid | the unique ID of the grid |
| defaultgridvalue | the default grid values |
| gridvalue | the current grid values |
| possibilities | the percentage of possibilities (0–100) |
Here is the call graph for this function:
|
static |
Creates a new GridBuilder for fluent construction of Grid instances.
| boolean fr.softsf.sudokufx.model.Grid.equals | ( | Object | obj | ) |
Compares this grid with another object for equality based on all fields.
Here is the call graph for this function:| String fr.softsf.sudokufx.model.Grid.getDefaultgridvalue | ( | ) |
Returns the default grid values.
| Long fr.softsf.sudokufx.model.Grid.getGridid | ( | ) |
Returns the unique identifier of the grid.
| String fr.softsf.sudokufx.model.Grid.getGridvalue | ( | ) |
Returns the current grid values.
| byte fr.softsf.sudokufx.model.Grid.getPossibilities | ( | ) |
Returns the percentage of possibilities for this grid.
| int fr.softsf.sudokufx.model.Grid.hashCode | ( | ) |
Computes the hash code based on all fields.
| void fr.softsf.sudokufx.model.Grid.setDefaultgridvalue | ( | @Nonnull String | defaultgridvalue | ) |
Sets the default grid values.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Grid.setGridvalue | ( | @Nonnull String | gridvalue | ) |
Sets the current grid values.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Grid.setPossibilities | ( | byte | possibilities | ) |
Sets the percentage of possibilities for this grid.
| String fr.softsf.sudokufx.model.Grid.toString | ( | ) |
Returns a string representation of the grid.
|
staticprivate |
Validates that the default grid value is not null.
| defaultgridvalue | the default grid value to validate |
| NullPointerException | if the default grid value is null |
|
staticprivate |
Validates that the grid value is not null.
| gridvalue | the grid value to validate |
| NullPointerException | if the grid value is null |
|
private |
Default values of the grid (length up to 81).
|
staticprivate |
|
staticprivate |
|
private |
Unique identifier of the grid (primary key).
|
private |
Current values of the grid (length up to 810).
|
staticprivate |
|
private |
Percentage of possibilities for this grid, between 0 and 100.