package org.apache.struts.action;

import java.io.Serializable;
import org.apache.commons.collections.FastHashMap;

public class ActionFormBeans implements Serializable {
  protected FastHashMap formBeans = new FastHashMap();
  
  public boolean getFast() {
    return this.formBeans.getFast();
  }
  
  public void setFast(boolean fast) {
    this.formBeans.setFast(fast);
  }
  
  public void addFormBean(ActionFormBean formBean) {
    this.formBeans.put(formBean.getName(), formBean);
  }
  
  public ActionFormBean findFormBean(String name) {
    return (ActionFormBean)this.formBeans.get(name);
  }
  
  public String[] findFormBeans() {
    return (String[])this.formBeans.keySet().toArray((Object[])new String[this.formBeans.size()]);
  }
  
  public void removeFormBean(ActionFormBean formBean) {
    this.formBeans.remove(formBean.getName());
  }
}
