Class SetOfNine

  • Direct Known Subclasses:
    Cell, CellGroup

    public abstract class SetOfNine
    extends java.lang.Object
    Abstract base class for the three types of cell groups of nine cells.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SetOfNine()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void blockExcept​(java.lang.Integer... values)
      Redefine the set of acceptable values for this cell.
      void blockValue​(java.lang.Integer i)
      Remove an Integer from the values still to be assigned to some cell of this group.
      java.util.Set<java.lang.Integer> getFree()
      Returns the set of Integers that still need to be assigned to some cell of this group.
      int getFreeCount()
      Returns the number of Integers that still need to be assigned to some cell of this group.
      java.lang.Integer getFreeValue()
      Returns the first (only) permissible Integer value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SetOfNine

        protected SetOfNine()
    • Method Detail

      • blockExcept

        public void blockExcept​(java.lang.Integer... values)
        Redefine the set of acceptable values for this cell.
        Parameters:
        values - the Integer objects representing the new set of acceptable values.
      • blockValue

        public void blockValue​(java.lang.Integer i)
        Remove an Integer from the values still to be assigned to some cell of this group.
        Parameters:
        i - an Integer object
      • getFree

        public java.util.Set<java.lang.Integer> 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

        public java.lang.Integer getFreeValue()
        Returns the first (only) permissible Integer value.
        Returns:
        an Integer object