Package org.openscience.cdk
Class ChemSequence
java.lang.Object
org.openscience.cdk.ChemObject
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:
- Keywords:
- animation, reaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intNumber of ChemModels contained by this container.protected IChemModel[]Array of ChemModels.protected final intAmount by which the chemModels array grows when elements are added and the array is not large enough for that.Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChemModel(IChemModel chemModel) Adds an chemModel to this container.Returns an Iterable to ChemModels in this container.clone()Clones thisIChemObject.getChemModel(int number) Returns the ChemModel at positionnumberin the container.intReturns the number of ChemModels in this Container.protected voidGrows the chemModel array by a given size.voidremoveChemModel(int pos) Remove a ChemModel from this ChemSequence.voidCalled by objects to which this object has registered as a listener.toString()Returns a one line description of this IChemObject.Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, clear, compare, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilderMethods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Field Details
-
chemModels
Array of ChemModels. -
chemModelCount
protected int chemModelCountNumber of ChemModels contained by this container. -
growArraySize
protected final int growArraySizeAmount by which the chemModels array grows when elements are added and the array is not large enough for that.- See Also:
-
-
Constructor Details
-
ChemSequence
public ChemSequence()Constructs an empty ChemSequence.
-
-
Method Details
-
addChemModel
Adds an chemModel to this container.- Specified by:
addChemModelin interfaceIChemSequence- Parameters:
chemModel- The chemModel to be added to this container- See Also:
-
removeChemModel
public void removeChemModel(int pos) Remove a ChemModel from this ChemSequence.- Specified by:
removeChemModelin interfaceIChemSequence- Parameters:
pos- The position of the ChemModel to be removed.
-
chemModels
Returns an Iterable to ChemModels in this container.- Specified by:
chemModelsin interfaceIChemSequence- Returns:
- The Iterable to ChemModels in this container
- See Also:
-
getChemModel
Returns the ChemModel at positionnumberin the container.- Specified by:
getChemModelin interfaceIChemSequence- Parameters:
number- The position of the ChemModel to be returned.- Returns:
- The ChemModel at position
number. - See Also:
-
growChemModelArray
protected void growChemModelArray()Grows the chemModel array by a given size.- See Also:
-
getChemModelCount
public int getChemModelCount()Returns the number of ChemModels in this Container.- Specified by:
getChemModelCountin interfaceIChemSequence- Returns:
- The number of ChemModels in this Container
-
toString
Description copied from interface:IChemObjectReturns a one line description of this IChemObject.- Specified by:
toStringin interfaceIChemObject- Overrides:
toStringin classObject- Returns:
- a String representation of this object
-
clone
Description copied from class:ChemObjectClones thisIChemObject. 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:
clonein interfaceIChemObject- Overrides:
clonein classChemObject- Returns:
- The cloned object
- Throws:
CloneNotSupportedException- if the IChemObject cannot be cloned
-
stateChanged
Called by objects to which this object has registered as a listener.- Specified by:
stateChangedin interfaceIChemObjectListener- Parameters:
event- A change event pointing to the source of the change
-