/** * 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(); }
/** * 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(); }
/** * 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) { boolean changed = properties.remove(description) != null; if (properties.isEmpty()) properties = null; if (changed) 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) { boolean changed = properties.remove(description) != null; if (properties.isEmpty()) properties = null; if (changed) 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 the whole set of flags. * * @param flagsNew the new flags. * @see #getFlags */ @Override public void setFlags(boolean[] flagsNew) { for (int i = 0; i < flagsNew.length; i++) setFlag(CDKConstants.FLAG_MASKS[i], flagsNew[i]); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void setFlag(int mask, boolean value) { if (mask > Short.MAX_VALUE || !isPowerOfTwo(mask)) throw new IllegalArgumentException("setFlag() must be provided a valid CDKConstant and not used for custom properties"); // 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(); }
/** {@inheritDoc} */ @Override public void notifyChanged(IChemObjectChangeEvent evt) { logger.debug("Notifying changed event: ", evt); super.notifyChanged(evt); }
/** * Sets the whole set of flags. * * @param flagsNew the new flags. * @see #getFlags */ @Override public void setFlags(boolean[] flagsNew) { for (int i = 0; i < flagsNew.length; i++) setFlag(CDKConstants.FLAG_MASKS[i], flagsNew[i]); notifyChanged(); }
/** {@inheritDoc} */ @Override public void notifyChanged() { logger.debug("Notifying changed"); super.notifyChanged(); }
/** * {@inheritDoc} */ @Override public void setFlag(int mask, boolean value) { if (mask > Short.MAX_VALUE || !isPowerOfTwo(mask)) throw new IllegalArgumentException("setFlag() must be provided a valid CDKConstant and not used for custom properties"); // set/unset a bit in the flags value if (value) flags |= mask; else flags &= ~(mask); 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(); }
/** * 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(); }