class MultiAttributeCollection extends MultiAttributeProvider implements AttributeCollection {

	@Override
	public boolean renameAttribute(String oldname, String newname) {
		final boolean b = this.runProviderEvents.getAndSet(false);
		try {
			boolean changed = false;
			final ManyValueAttributeValue currentValue = new ManyValueAttributeValue();
			for (final AttributeProvider c : containers()) {
				assign(currentValue, c.getAttribute(oldname));
				if (c instanceof AttributeCollection) {
					changed = ((AttributeCollection) c).renameAttribute(oldname, newname) || changed;
				}
			}
			if (changed) {
				final AttributeValue cValue = canonize(currentValue);
				this.cache.remove(oldname);
				this.cache.remove(newname);
				if (this.names != null) {
					this.names.remove(oldname);
					this.names.add(newname);
				}
				fireAttributeChange(new AttributeChangeEvent(this, Type.RENAME, oldname, cValue, newname, cValue));
			}
			return changed;
		} finally {
			this.runProviderEvents.set(b);
		}
	}

}