public AbstractAttributedFigure clone() { AbstractAttributedFigure that = (AbstractAttributedFigure) super.clone(); that.attributes = new HashMap<AttributeKey, Object>(this.attributes); if (this.forbiddenAttributes != null) { that.forbiddenAttributes = new HashSet<AttributeKey>(this.forbiddenAttributes); } return that; }