* a <tt>ScheduleDuration</tt> object; cannot be null.
* @throws NullPointerException
* if <tt>duration</tt> is null.
*/
public void setDuration(ScheduleDuration duration) {
ScheduleDuration old = getDuration();
// Always append the data, even if the new duration is identical
// to the old one. This is to make sure that the key-value pairs
// get created in the case where this is the first time this method
// is called and duration is the default duration.
duration.appendToData(getData());
if (!old.equals(duration)) {
firePropertyChange(DURATION_PROPERTY, old, duration);
}
}