public void update() { List toRemove = new List(); for (int i = 0; i < steps.size(); i++) { AutonomousStep step = (AutonomousStep) steps.get(i); step.update(); if (step.isFinished()) { toRemove.add(step); } } for(int i = 0; i < toRemove.size(); i++) { steps.remove(toRemove.get(i)); } if (steps.isEmpty()) { finished = true; } }
/** * Reads the config file /ws_config.txt unless setFileName has been used to * change the filename. Supports comment lines using // delineator. Comments * can be by themselves on a line or at the end of the line. * * The config file should be on the format key=value Example: * com.wildstangs.WsInputManager.WsDriverJoystick.trim=0.1 * * @throws WsConfigManagerException */ public void readConfig() throws WsConfigManagerException { try { config = (List) WsConfigFacadeImpl.readConfig(configFileName); } catch (WsConfigFacadeImplException e) { throw new WsConfigManagerException(e.toString()); } Logger.getLogger().always(this.getClass().getName(), "readConfig", "Read config File: " + configFileName); //Update all the facades WsInputManager.getInstance().notifyConfigChange(); WsOutputManager.getInstance().notifyConfigChange(); WsSubsystemContainer.getInstance().notifyConfigChange(); }
/** * Reads the config file /ws_config.txt unless setFileName has been used to * change the filename. Supports comment lines using // delineator. Comments * can be by themselves on a line or at the end of the line. * * The config file should be on the format key=value Example: * com.wildstangs.InputManager.WsDriverJoystick.trim=0.1 * * @throws ConfigManagerException */ public void readConfig() throws ConfigManagerException { try { config = (List) ConfigManagerImpl.readConfig(configFileName); } catch (ConfigManagerImplException e) { throw new ConfigManagerException(e.toString()); } Logger.getLogger().always(this.getClass().getName(), "readConfig", "Read config File: " + configFileName); //Update all the facades InputManager.getInstance().notifyConfigChange(); OutputManager.getInstance().notifyConfigChange(); SubsystemContainer.getInstance().notifyConfigChange(); }
protected Subject(String name, ISubjectEnum type) { this.name = name; observers = new List(); this.type = type; }