/** * Gets or creates a {@link Robot} for the given name. * * @param robotName the name of the robot. * @param account the {@link RobotAccountData} belonging to the given * {@link RobotName}. */ private Robot getOrCreateRobot(RobotName robotName, RobotAccountData account) { Robot robot = allRobots.get(robotName); if (robot == null) { robot = createNewRobot(robotName, account); allRobots.put(robotName, robot); } return robot; }