com.eriksilkensen.sudoku
Class BoardStats

java.lang.Object
  extended by com.eriksilkensen.sudoku.BoardStats

public class BoardStats
extends java.lang.Object

Encapsulates the information for how many Boards have been Solved and what Boards have been solved

Version:
03/15/07
Author:
Erik Silkensen

Constructor Summary
BoardStats()
          Initializes the 'stats' by attempting to read them in from the stats.ser file
 
Method Summary
 void add(java.lang.Integer stat)
          Adds 'stat' to the Set of stats writes out to the file
 boolean contains(java.lang.Integer stat)
          Returns whether or not the TreeSet of Integers contains the specified 'stat'
 int getStatCount()
          Returns the total size of the stats Set
 int getStatCount(BoardDifficulties difficulty, int individualSize)
          Overloaded getStatCount returns size (number) of stats for a given difficulty level, assuming the caller supplies the number of possible Boards in each difficulty level
 java.lang.String getStatNumbers()
          Returns a String representation (for a View) of the stats
 void read()
          Public read() method for reading the stats.ser file
 void remove(java.lang.Integer stat)
          Removes 'stat' from the Set of stats writes out to the file
 void write()
          Public write() method for writing the stats.ser file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoardStats

public BoardStats()
Initializes the 'stats' by attempting to read them in from the stats.ser file

Method Detail

contains

public boolean contains(java.lang.Integer stat)
Returns whether or not the TreeSet of Integers contains the specified 'stat'


add

public void add(java.lang.Integer stat)
Adds 'stat' to the Set of stats writes out to the file


remove

public void remove(java.lang.Integer stat)
Removes 'stat' from the Set of stats writes out to the file


getStatCount

public int getStatCount()
Returns the total size of the stats Set


getStatCount

public int getStatCount(BoardDifficulties difficulty,
                        int individualSize)
Overloaded getStatCount returns size (number) of stats for a given difficulty level, assuming the caller supplies the number of possible Boards in each difficulty level


getStatNumbers

public java.lang.String getStatNumbers()
Returns a String representation (for a View) of the stats


write

public void write()
Public write() method for writing the stats.ser file


read

public void read()
Public read() method for reading the stats.ser file