Package io.github.skenvy
Class Cell
java.lang.Object
io.github.skenvy.Cell
An individual cell in the whole grid.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
Used for cell related exceptions.final class
-
Constructor Summary
ConstructorsConstructorDescriptionCell()
Initialise an empty cell for a standard sudoku board of size 3*3*3*3.Cell
(int initialValue) Initialise a non-empty cell for a standard sudoku board of size 3*3*3*3.Cell
(int initialValue, int boardSize) Initialise a non-empty cell for a sudoku board of arbitrary size.Cell
(int initialValue, int boardSize, CellCollection row, CellCollection column, CellCollection box) Initialise a non-empty cell for a sudoku board of arbitrary size. -
Method Summary
-
Constructor Details
-
Cell
public Cell()Initialise an empty cell for a standard sudoku board of size 3*3*3*3. -
Cell
Initialise a non-empty cell for a standard sudoku board of size 3*3*3*3.- Parameters:
initialValue
- is used to provide an initial value.- Throws:
Cell.SudokuCellInvalidInitialValueException
- when attempting to create a new Cell with an invalid value
-
Cell
Initialise a non-empty cell for a sudoku board of arbitrary size.- Parameters:
initialValue
- is used to provide an initial value.boardSize
- is used to specify a row / column length other than 9.- Throws:
Cell.SudokuCellInvalidInitialValueException
- when attempting to create a new Cell with an invalid value
-
Cell
public Cell(int initialValue, int boardSize, CellCollection row, CellCollection column, CellCollection box) throws Cell.SudokuCellInvalidInitialValueException Initialise a non-empty cell for a sudoku board of arbitrary size.- Parameters:
initialValue
- is used to provide an initial value.boardSize
- is used to specify a row / column length other than 9.- Throws:
Cell.SudokuCellInvalidInitialValueException
- when attempting to create a new Cell with an invalid value
-
-
Method Details
-
getValue
public int getValue() -
setValue
-