|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.tournament.match.UT2004MatchConfig
public class UT2004MatchConfig
Base configuration of the UT2004 match, you have to specify:
GameBots2004Ini
UCCWrapperConf
UT2004BotConfig
Field Summary | |
---|---|
protected Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> |
bots
|
protected GameBots2004Ini |
gb2004Ini
|
protected cz.cuni.amis.utils.token.IToken |
matchId
|
protected Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> |
nativeBots
|
protected File |
outputDirectory
|
protected UCCWrapperConf |
uccConf
|
protected StringBuffer |
validationBuffer
|
protected boolean |
validationError
|
Constructor Summary | |
---|---|
UT2004MatchConfig()
|
|
UT2004MatchConfig(UT2004MatchConfig orig)
Copy-constructor. |
Method Summary | |
---|---|
UT2004MatchConfig |
addBot(UT2004BotConfig... bots)
Adds NEW bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception). |
UT2004MatchConfig |
addNativeBot(UT2004NativeBotConfig... bots)
Adds NEW native bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception). |
UT2004MatchConfig |
clearBots()
|
UT2004MatchConfig |
clearNativeBots()
|
boolean |
equals(Object obj)
|
List<cz.cuni.amis.utils.token.IToken> |
getAllBotIds()
Ids are sorted: 1) custom bots, 2) native bots. |
Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> |
getBots()
|
GameBots2004Ini |
getGb2004Ini()
Preinitialized automatically. |
cz.cuni.amis.utils.token.IToken |
getMatchId()
|
Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> |
getNativeBots()
|
File |
getOutputDirectory()
|
UCCWrapperConf |
getUccConf()
|
int |
hashCode()
|
boolean |
isHumanLikeLogEnabled()
|
boolean |
isNativeBot(cz.cuni.amis.utils.token.IToken botId)
|
UT2004MatchConfig |
setBot(UT2004BotConfig... bots)
Sets bot configuration into the object, does not checks whether there is BotId clash. |
UT2004MatchConfig |
setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots)
|
UT2004MatchConfig |
setGb2004Ini(GameBots2004Ini gb2004Ini)
No need to call, preinitialized automatically. |
UT2004MatchConfig |
setHumanLikeLogEnabled(boolean humanLikeLog)
|
void |
setMatchId(cz.cuni.amis.utils.token.IToken matchId)
|
void |
setMatchId(String matchId)
|
UT2004MatchConfig |
setNativeBot(UT2004NativeBotConfig... bots)
Sets native bot configuration into the object, does not checks whether there is BotId clash. |
UT2004MatchConfig |
setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots)
|
UT2004MatchConfig |
setOutputDirectory(File outputDirectory)
|
UT2004MatchConfig |
setUccConf(UCCWrapperConf uccConf)
|
void |
validate()
Checks the contents, whether everything is set-up correctly, if not, raises an exception with explanation. |
protected void |
validateInner()
Performs validation of the match configuration: Checks whether the match id is non-null. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File outputDirectory
protected cz.cuni.amis.utils.token.IToken matchId
protected UCCWrapperConf uccConf
protected GameBots2004Ini gb2004Ini
protected Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots
protected Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots
protected final StringBuffer validationBuffer
protected boolean validationError
Constructor Detail |
---|
public UT2004MatchConfig()
public UT2004MatchConfig(UT2004MatchConfig orig)
orig
- Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public File getOutputDirectory()
public cz.cuni.amis.utils.token.IToken getMatchId()
public void setMatchId(cz.cuni.amis.utils.token.IToken matchId)
public void setMatchId(String matchId)
public UCCWrapperConf getUccConf()
public GameBots2004Ini getGb2004Ini()
public Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> getBots()
public Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> getNativeBots()
public List<cz.cuni.amis.utils.token.IToken> getAllBotIds()
WARNING: O(n*log(n)) complexity!
public UT2004MatchConfig setOutputDirectory(File outputDirectory)
public UT2004MatchConfig setUccConf(UCCWrapperConf uccConf)
public UT2004MatchConfig setGb2004Ini(GameBots2004Ini gb2004Ini)
public UT2004MatchConfig setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots)
public UT2004MatchConfig setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots)
public UT2004MatchConfig clearBots()
public UT2004MatchConfig clearNativeBots()
public UT2004MatchConfig addBot(UT2004BotConfig... bots)
bots
-
public UT2004MatchConfig setBot(UT2004BotConfig... bots)
bots
-
public UT2004MatchConfig addNativeBot(UT2004NativeBotConfig... bots)
bots
-
public UT2004MatchConfig setNativeBot(UT2004NativeBotConfig... bots)
bots
-
public boolean isNativeBot(cz.cuni.amis.utils.token.IToken botId)
public boolean isHumanLikeLogEnabled()
public UT2004MatchConfig setHumanLikeLogEnabled(boolean humanLikeLog)
protected void validateInner()
UccWrapper
is not null and its directory exists.GameBots2004Ini
is not null.Override to provide/add custom validation (might require copy-paste of the code from this method).
public final void validate()
Recalls validateInner()
that should fill validationBuffer
with
messages and if there is a fatal error in the configuration, it should set true to validationError
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |