@SuppressWarnings("unchecked") public void setAttributes(Map<AttributeKey, Object> map) { for (Map.Entry<AttributeKey, Object> entry : map.entrySet()) { set(entry.getKey(), entry.getValue()); } }
@Override public <T> void set(AttributeKey<T> key, T newValue) { super.set(key, newValue); invalidate(); }
@Override public <T> void set(AttributeKey<T> key, T newValue) { super.set(key, newValue); invalidate(); }
@SuppressWarnings("unchecked") protected void readAttributes(DOMInput in) throws IOException { if (in.getElementCount("a") > 0) { in.openElement("a"); for (int i = in.getElementCount() - 1; i >= 0; i--) { in.openElement(i); String name = in.getTagName(); Object value = in.readObject(); AttributeKey key = getAttributeKey(name); if (key != null && key.isAssignable(value)) { if (forbiddenAttributes == null || !forbiddenAttributes.contains(key)) { set(key, value); } } in.closeElement(); } in.closeElement(); } }