public class ChemSequence extends ChemObject implements Serializable, IChemSequence, IChemObjectListener, Cloneable
Modifier and Type | Field and Description |
---|---|
protected int |
chemModelCount
Number of ChemModels contained by this container.
|
protected IChemModel[] |
chemModels
Array of ChemModels.
|
protected int |
growArraySize
Amount by which the chemModels array grows when elements are added and
the array is not large enough for that.
|
Constructor and Description |
---|
ChemSequence()
Constructs an empty ChemSequence.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
growChemModelArray()
Grows the chemModel array by a given size.
|
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.
|
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 IChemModel[] chemModels
protected int chemModelCount
protected int growArraySize
public void addChemModel(IChemModel chemModel)
addChemModel
in interface IChemSequence
chemModel
- The chemModel to be added to this containergetChemModel(int)
public void removeChemModel(int pos)
removeChemModel
in interface IChemSequence
pos
- The position of the ChemModel to be removed.public Iterable<IChemModel> chemModels()
chemModels
in interface IChemSequence
addChemModel(org.openscience.cdk.interfaces.IChemModel)
public IChemModel getChemModel(int number)
number
in the
container.getChemModel
in interface IChemSequence
number
- The position of the ChemModel to be returned.number
.addChemModel(org.openscience.cdk.interfaces.IChemModel)
protected void growChemModelArray()
growArraySize
public int getChemModelCount()
getChemModelCount
in interface IChemSequence
public String toString()
IChemObject
toString
in interface IChemObject
toString
in class Object
public Object clone() throws CloneNotSupportedException
ChemObject
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 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 © 2021. All rights reserved.