/** * Sets the identifier (ID) of this object. * *@param identifier a String representing the ID value *@see #getID */ @Override public void setID(String identifier) { this.identifier = identifier; notifyChanged(); }
/** *{@inheritDoc} */ @Override public void setFlag(int mask, boolean value) { // set/unset a bit in the flags value if (value) flags |= mask; else flags &= ~(mask); notifyChanged(); }
/** * Sets the properties of this object. * *@param properties a Hashtable specifying the property values *@see #getProperties */ @Override public void addProperties(Map<Object, Object> properties) { if (properties == null) return; lazyProperties().putAll(properties); notifyChanged(); }
/** * Sets a property for a IChemObject. * *@param description An object description of the property (most likely a * unique string) *@param property An object with the property itself *@see #getProperty *@see #removeProperty */ @Override public void setProperty(Object description, Object property) { lazyProperties().put(description, property); notifyChanged(); }
/** * Removes a property for a IChemObject. * *@param description The object description of the property (most likely a * unique string) *@see #setProperty *@see #getProperty */ @Override public void removeProperty(Object description) { if (properties == null) { return; } if (lazyProperties().remove(description) != null) notifyChanged(); }