code: public <T extends ICalComponent> List<T> setComponent(Class<T> clazz, T component) {
  		List<ICalComponent> replaced = components.replace(clazz, component);
  		return castList(replaced, clazz);
  	}
docs: Replaces all sub-components of a given class with the given component. If
  the component instance is null, then all instances of that component will
  be removed.
  @param clazz the component's class
  @param component the component or null to remove all components of the
  given class
  @param <T> the component class
  @return the replaced sub-components (this list is immutable)