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, shallowCopy
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
protected IChemSequence[] chemSequences
protected int chemSequenceCount
protected int growArraySize
public void addChemSequence(IChemSequence chemSequence)
addChemSequence
in interface IChemFile
chemSequence
- The chemSequence to be added to this containerchemSequences
public void removeChemSequence(int pos)
removeChemSequence
in interface IChemFile
pos
- The position from which to removechemSequences
,
addChemSequence(org.openscience.cdk.interfaces.IChemSequence)
public Iterable<IChemSequence> chemSequences()
chemSequences
in interface IChemFile
addChemSequence(org.openscience.cdk.interfaces.IChemSequence)
public IChemSequence getChemSequence(int number)
number
in the container.getChemSequence
in interface IChemFile
number
- The position of the ChemSequence to be returned.number
.addChemSequence(org.openscience.cdk.interfaces.IChemSequence)
protected void growChemSequenceArray()
growArraySize
public int getChemSequenceCount()
getChemSequenceCount
in interface IChemFile
public String toString()
toString
in interface IChemObject
toString
in class Object
public Object clone() throws CloneNotSupportedException
clone
in interface IChemObject
clone
in class ChemObject
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic void stateChanged(IChemObjectChangeEvent event)
stateChanged
in interface IChemObjectListener
event
- A change event pointing to the source of the changeCopyright © 2017. All Rights Reserved.