Package org.drools.examples.sudoku
Class SetOfNine
java.lang.Object
org.drools.examples.sudoku.SetOfNine
Abstract base class for the three types of cell groups of nine cells.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblockExcept(Integer... values) Redefine the set of acceptable values for this cell.voidRemove an Integer from the values still to be assigned to some cell of this group.getFree()Returns the set of Integers that still need to be assigned to some cell of this group.intReturns the number of Integers that still need to be assigned to some cell of this group.Returns the first (only) permissible Integer value.
-
Constructor Details
-
SetOfNine
protected SetOfNine()
-
-
Method Details
-
blockExcept
Redefine the set of acceptable values for this cell.- Parameters:
values- the Integer objects representing the new set of acceptable values.
-
blockValue
Remove an Integer from the values still to be assigned to some cell of this group.- Parameters:
i- an Integer object
-
getFree
Returns the set of Integers that still need to be assigned to some cell of this group.- Returns:
- a Set of Integer objects.
-
getFreeCount
public int getFreeCount()Returns the number of Integers that still need to be assigned to some cell of this group.- Returns:
- an int value
-
getFreeValue
Returns the first (only) permissible Integer value.- Returns:
- an Integer object
-