public class ChemFile extends ChemObject implements Serializable, Cloneable, IChemFile, IChemObjectListener
| Modifier and Type | Field and Description |
|---|---|
protected int |
chemSequenceCount
Number of ChemSequences contained by this container.
|
protected IChemSequence[] |
chemSequences
Array of ChemSquences.
|
protected int |
growArraySize
Amount by which the chemsequence array grows when elements are added and
the array is not large enough for that.
|
| Constructor and Description |
|---|
ChemFile()
Constructs an empty ChemFile.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChemSequence(IChemSequence chemSequence)
Adds a ChemSequence to this container.
|
Iterable<IChemSequence> |
chemSequences()
Returns the Iterable to ChemSequences of this container.
|
Object |
clone()
Allows for getting an clone of this object.
|
IChemSequence |
getChemSequence(int number)
Returns the ChemSequence at position
number in the container. |
int |
getChemSequenceCount()
Returns the number of ChemSequences in this Container.
|
protected void |
growChemSequenceArray()
Grows the ChemSequence array by a given size.
|
void |
removeChemSequence(int pos)
Removes a ChemSequence from this container.
|
void |
stateChanged(IChemObjectChangeEvent event)
Called by objects to which this object has
registered as a listener.
|
String |
toString()
Returns a String representation of this class.
|
addListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setPropertygetBuilderprotected IChemSequence[] chemSequences
protected int chemSequenceCount
protected int growArraySize
public void addChemSequence(IChemSequence chemSequence)
addChemSequence in interface IChemFilechemSequence - The chemSequence to be added to this containerchemSequencespublic void removeChemSequence(int pos)
removeChemSequence in interface IChemFilepos - The position from which to removechemSequences,
addChemSequence(org.openscience.cdk.interfaces.IChemSequence)public Iterable<IChemSequence> chemSequences()
chemSequences in interface IChemFileaddChemSequence(org.openscience.cdk.interfaces.IChemSequence)public IChemSequence getChemSequence(int number)
number in the container.getChemSequence in interface IChemFilenumber - The position of the ChemSequence to be returned.number.addChemSequence(org.openscience.cdk.interfaces.IChemSequence)protected void growChemSequenceArray()
growArraySizepublic int getChemSequenceCount()
getChemSequenceCount in interface IChemFilepublic String toString()
toString in interface IChemObjecttoString in class Objectpublic Object clone() throws CloneNotSupportedException
clone in interface IChemObjectclone in class ChemObjectCloneNotSupportedException - if the IChemObject cannot be clonedpublic void stateChanged(IChemObjectChangeEvent event)
stateChanged in interface IChemObjectListenerevent - A change event pointing to the source of the changeCopyright © 2017. All Rights Reserved.