import java.util.*;

class ObservableAttributedImpl
    extends Observable
    implements Attributed
{
    AttributedImpl attrImpl = new AttributedImpl();

    // forward Attributed methods to the attrImpl object;
    // notify observers of changes

    public void add(Attr newAttr) {
	attrImpl.add(newAttr);
	setChanged();
	notifyObservers(newAttr);
    }

    public Attr find(String name) {
	return attrImpl.find(name);
    }

    public Attr remove(String name) {
	Attr oldAttr = attrImpl.remove(name);
	setChanged();
	notifyObservers(oldAttr);
	return oldAttr;
    }

    public Enumeration attrs() {
	return attrImpl.attrs();
    }
}
