|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openscience.cdk.ChemObject
public class ChemObject
The base class for all chemical objects in this cdk. It provides methods for adding listeners and for their notification of events, as well a a hash table for administration of physical or chemical properties
| Constructor Summary | |
|---|---|
ChemObject()
Constructs a new IChemObject. |
|
ChemObject(IChemObject chemObject)
Constructs a new IChemObject by copying the flags, and the identifier. |
|
| Method Summary | |
|---|---|
void |
addListener(IChemObjectListener col)
Use this to add yourself to this IChemObject as a listener. |
Object |
clone()
Clones this IChemObject. |
boolean |
compare(Object object)
Compares a IChemObject with this IChemObject. |
IChemObjectBuilder |
getBuilder()
Returns a IChemObjectBuilder for the data classes that extend
this class. |
boolean |
getFlag(int flag_type)
Returns the value of some flag. |
boolean[] |
getFlags()
Returns the whole set of flags. |
String |
getID()
Returns the identifier (ID) of this object. |
int |
getListenerCount()
Returns the number of ChemObjectListeners registered with this object. |
boolean |
getNotification()
Returns the flag that indicates whether notification messages are sent around. |
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties. |
Object |
getProperty(Object description)
Returns a property for the IChemObject. |
void |
notifyChanged()
This should be triggered by an method that changes the content of an object to that the registered listeners can react to it. |
void |
notifyChanged(IChemObjectChangeEvent evt)
This should be triggered by an method that changes the content of an object to that the registered listeners can react to it. |
void |
removeListener(IChemObjectListener col)
Use this to remove a ChemObjectListener from the ListenerList of this IChemObject. |
void |
removeProperty(Object description)
Removes a property for a IChemObject. |
void |
setFlag(int flag_type,
boolean flag_value)
Sets the value of some flag. |
void |
setFlags(boolean[] flagsNew)
Sets the whole set of flags. |
void |
setID(String identifier)
Sets the identifier (ID) of this object. |
void |
setNotification(boolean bool)
Set a flag to use or not use notification. |
void |
setProperties(Map<Object,Object> properties)
Sets the properties of this object. |
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject. |
Object |
shallowCopy()
Clones this IChemObject, but preserves references to Objects. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openscience.cdk.interfaces.IChemObject |
|---|
toString |
| Constructor Detail |
|---|
public ChemObject()
public ChemObject(IChemObject chemObject)
chemObject - the object to copy| Method Detail |
|---|
public void addListener(IChemObjectListener col)
addListener in interface IChemObjectcol - the ChemObjectListenerremoveListener(org.openscience.cdk.interfaces.IChemObjectListener)public int getListenerCount()
getListenerCount in interface IChemObjectpublic void removeListener(IChemObjectListener col)
removeListener in interface IChemObjectcol - The ChemObjectListener to be removedaddListener(org.openscience.cdk.interfaces.IChemObjectListener)public void notifyChanged()
notifyChanged in interface IChemObjectpublic void notifyChanged(IChemObjectChangeEvent evt)
notifyChanged in interface IChemObjectevt - A ChemObjectChangeEvent pointing to the source of where
the change happend
public void setProperty(Object description,
Object property)
setProperty in interface IChemObjectdescription - An object description of the property (most likely a
unique string)property - An object with the property itselfgetProperty(java.lang.Object),
removeProperty(java.lang.Object)public void removeProperty(Object description)
removeProperty in interface IChemObjectdescription - The object description of the property (most likely a
unique string)setProperty(java.lang.Object, java.lang.Object),
getProperty(java.lang.Object)public Object getProperty(Object description)
getProperty in interface IChemObjectdescription - An object description of the property (most likely a
unique string)
setProperty(java.lang.Object, java.lang.Object),
removeProperty(java.lang.Object)public Map<Object,Object> getProperties()
getProperties in interface IChemObjectsetProperties(java.util.Map)
public Object clone()
throws CloneNotSupportedException
IChemObject. It clones the identifier, flags,
properties and pointer vectors. The ChemObjectListeners are not cloned, and
neither is the content of the pointer vectors.
clone in interface IChemObjectclone in class ObjectCloneNotSupportedException - if the IChemObject cannot be clonedpublic boolean compare(Object object)
object - Object of type AtomType
public String getID()
getID in interface IChemObjectsetID(java.lang.String)public void setID(String identifier)
setID in interface IChemObjectidentifier - a String representing the ID valuegetID()
public void setFlag(int flag_type,
boolean flag_value)
setFlag in interface IChemObjectflag_type - Flag to setflag_value - Value to assign to flaggetFlag(int)public boolean getFlag(int flag_type)
getFlag in interface IChemObjectflag_type - Flag to retrieve the value of
flag_type is setsetFlag(int, boolean)public void setProperties(Map<Object,Object> properties)
setProperties in interface IChemObjectproperties - a Hashtable specifying the property valuesgetProperties()public void setFlags(boolean[] flagsNew)
setFlags in interface IChemObjectflagsNew - the new flags.getFlags()public boolean[] getFlags()
getFlags in interface IChemObjectsetFlags(boolean[])public Object shallowCopy()
IChemObject, but preserves references to Objects.
clone()public IChemObjectBuilder getBuilder()
ICDKObjectIChemObjectBuilder for the data classes that extend
this class.
getBuilder in interface ICDKObjectIChemObjectBuilder matching this ICDKObjectpublic void setNotification(boolean bool)
IChemObject
setNotification in interface IChemObjectbool - if true, then notification messages are sent.IChemObject.getNotification()public boolean getNotification()
IChemObject
getNotification in interface IChemObjectIChemObject.setNotification(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||