bot
Class BoardFactory

java.lang.Object
  extended bybot.BoardFactory
All Implemented Interfaces:
BoardGenerator
Direct Known Subclasses:
DirectoryGenerator

public class BoardFactory
extends Object
implements BoardGenerator

Generate boards from file names. Can take a whole list of filenames if desired.


Field Summary
static String BOARD_POSTFIX
           
static String BOARD_PREFIX
           
 
Constructor Summary
BoardFactory()
           
 
Method Summary
 void addBoardName(String nm)
          Add the name to the list of names to rotate through.
 void addBoardName(String nm, boolean check)
          Add name.
 boolean check(String boardName)
          Check to see if given file is valid.
 boolean check(URL u)
           
 Board generateBoard()
          Generate a board from the next name in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOARD_PREFIX

public static String BOARD_PREFIX

BOARD_POSTFIX

public static String BOARD_POSTFIX
Constructor Detail

BoardFactory

public BoardFactory()
Method Detail

addBoardName

public void addBoardName(String nm)
Add the name to the list of names to rotate through.


addBoardName

public void addBoardName(String nm,
                         boolean check)
Add name. check is whether to pre-load board to see if it is good.


check

public boolean check(String boardName)
Check to see if given file is valid.

Returns:
true if the board assoc. with file is okay.

check

public boolean check(URL u)

generateBoard

public Board generateBoard()
Generate a board from the next name in the list.

Specified by:
generateBoard in interface BoardGenerator
Returns:
shiny new board, ready for use.