package org.apache.struts.action;

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

public class ActionForwards implements Serializable {
  private FastHashMap forwards = new FastHashMap();
  
  public boolean getFast() {
    return this.forwards.getFast();
  }
  
  public void setFast(boolean fast) {
    this.forwards.setFast(fast);
  }
  
  public void addForward(ActionForward forward) {
    this.forwards.put(forward.getName(), forward);
  }
  
  public ActionForward findForward(String name) {
    return (ActionForward)this.forwards.get(name);
  }
  
  public String[] findForwards() {
    return (String[])this.forwards.keySet().toArray((Object[])new String[this.forwards.size()]);
  }
  
  public void removeForward(ActionForward forward) {
    this.forwards.remove(forward.getName());
  }
}
