org.openscience.cdk
Class ChemSequence

java.lang.Object
  extended by org.openscience.cdk.ChemObject
      extended by org.openscience.cdk.ChemSequence
All Implemented Interfaces:
Serializable, Cloneable, ICDKObject, IChemObject, IChemObjectListener, IChemSequence
Direct Known Subclasses:
DebugChemSequence

public class ChemSequence
extends ChemObject
implements Serializable, IChemSequence, IChemObjectListener, Cloneable

A sequence of ChemModels, which can, for example, be used to store the course of a reaction. Each state of the reaction would be stored in one ChemModel.

See Also:
Serialized Form
Keywords:
animation, reaction
Belongs to CDK module:
data
Source code:
cdk-1.4.x

Constructor Summary
ChemSequence()
          Constructs an empty ChemSequence.
 
Method Summary
 void addChemModel(IChemModel chemModel)
          Adds an chemModel to this container.
 Iterable<IChemModel> chemModels()
          Returns an Iterable to ChemModels in this container.
 Object clone()
          Clones this IChemObject.
 IChemModel getChemModel(int number)
          Returns the ChemModel at position number in the container.
 int getChemModelCount()
          Returns the number of ChemModels in this Container.
 void removeChemModel(int pos)
          Remove a ChemModel from this ChemSequence.
 void stateChanged(IChemObjectChangeEvent event)
          Called by objects to which this object has registered as a listener.
 String toString()
          Returns a one line description of this IChemObject.
 
Methods inherited from class org.openscience.cdk.ChemObject
addListener, compare, getBuilder, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
 
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
 

Constructor Detail

ChemSequence

public ChemSequence()
Constructs an empty ChemSequence.

Method Detail

addChemModel

public void addChemModel(IChemModel chemModel)
Adds an chemModel to this container.

Specified by:
addChemModel in interface IChemSequence
Parameters:
chemModel - The chemModel to be added to this container
See Also:
getChemModel(int)

removeChemModel

public void removeChemModel(int pos)
Remove a ChemModel from this ChemSequence.

Specified by:
removeChemModel in interface IChemSequence
Parameters:
pos - The position of the ChemModel to be removed.

chemModels

public Iterable<IChemModel> chemModels()
Returns an Iterable to ChemModels in this container.

Specified by:
chemModels in interface IChemSequence
Returns:
The Iterable to ChemModels in this container
See Also:
addChemModel(org.openscience.cdk.interfaces.IChemModel)

getChemModel

public IChemModel getChemModel(int number)
Returns the ChemModel at position number in the container.

Specified by:
getChemModel in interface IChemSequence
Parameters:
number - The position of the ChemModel to be returned.
Returns:
The ChemModel at position number.
See Also:
addChemModel(org.openscience.cdk.interfaces.IChemModel)

getChemModelCount

public int getChemModelCount()
Returns the number of ChemModels in this Container.

Specified by:
getChemModelCount in interface IChemSequence
Returns:
The number of ChemModels in this Container

toString

public String toString()
Description copied from interface: IChemObject
Returns a one line description of this IChemObject.

Specified by:
toString in interface IChemObject
Overrides:
toString in class Object
Returns:
a String representation of this object

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: ChemObject
Clones this IChemObject. It clones the identifier, flags, properties and pointer vectors. The ChemObjectListeners are not cloned, and neither is the content of the pointer vectors.

Specified by:
clone in interface IChemObject
Overrides:
clone in class ChemObject
Returns:
The cloned object
Throws:
CloneNotSupportedException - if the IChemObject cannot be cloned

stateChanged

public void stateChanged(IChemObjectChangeEvent event)
Called by objects to which this object has registered as a listener.

Specified by:
stateChanged in interface IChemObjectListener
Parameters:
event - A change event pointing to the source of the change