public class BotManager
extends java.lang.Object
Constructor and Description |
---|
BotManager()
Initializes the bot manager with a fresh map and counter
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addBot(Bot bot)
Begins tracking bot under the BotManager and return its managed name
|
int |
generateBotNumber()
Returns the next available int for a bot number.
|
java.util.Collection<Bot> |
getAllTrackedBots()
Gets all the bots currently tracked
|
java.util.Optional<Bot> |
getBotByName(java.lang.String name)
Returns the bot associated with name if it exists
|
java.util.Optional<Bot> |
removeBotByName(java.lang.String botName)
Removes bot with id botId from the botMap and returns it
|
public BotManager()
public java.lang.String addBot(Bot bot)
bot
- The bot object that was created for the botpublic java.util.Optional<Bot> getBotByName(java.lang.String name)
name
- The name provided for the bot when it was createdpublic java.util.Optional<Bot> removeBotByName(java.lang.String botName)
botName
- the managed name of the botpublic java.util.Collection<Bot> getAllTrackedBots()
public int generateBotNumber()