jaige
Class AIDatabase

java.lang.Object
  extended by jaige.AIDatabase

public class AIDatabase
extends java.lang.Object


Constructor Summary
AIDatabase(java.lang.Class clazz)
           
 
Method Summary
 java.util.List<AI> getAllVersions(AI ai)
          Returns a list of all AI's that share the same name and author.
static AIDatabase getInstance()
           
 java.util.Collection<AI> getInstanceOfAll()
           
 AI getPlayer(java.lang.Class clazz)
           
 AI getPlayer(java.lang.String name)
          Gets the AI with the given name.
 java.lang.String[] getPlayers()
          Returns an array of the available AI's.
static void initialize(java.lang.Class clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AIDatabase

public AIDatabase(java.lang.Class clazz)
Method Detail

initialize

public static void initialize(java.lang.Class clazz)

getInstance

public static AIDatabase getInstance()

getInstanceOfAll

public java.util.Collection<AI> getInstanceOfAll()

getPlayers

public java.lang.String[] getPlayers()
Returns an array of the available AI's.

Returns:
Player[] Available AI's.

getPlayer

public AI getPlayer(java.lang.String name)
Gets the AI with the given name.

Parameters:
name - String
Returns:
Player

getPlayer

public AI getPlayer(java.lang.Class clazz)

getAllVersions

public java.util.List<AI> getAllVersions(AI ai)
Returns a list of all AI's that share the same name and author. If there is more than one version of this AI, the class for each will be returned. Otherwise it only returns itself.

Parameters:
ai - Class of the AI we are trying to find different versions for.
Returns:
List of each Class that share the same name and author.