public class Polymer extends AtomContainer implements Serializable, IPolymer
atomCount, atoms, bondCount, bonds, growArraySize, lonePairCount, lonePairs, singleElectronCount, singleElectrons, stereoElements
Constructor and Description |
---|
Polymer()
Constructs a new Polymer to store the Monomers.
|
Modifier and Type | Method and Description |
---|---|
void |
addAtom(IAtom oAtom,
IMonomer oMonomer)
Adds the atom oAtom to a specified Monomer.
|
IPolymer |
clone()
Clones this
IChemObject . |
IMonomer |
getMonomer(String cName)
Retrieves a Monomer object by specifying its name.
|
int |
getMonomerCount()
Returns the number of monomers present in the Polymer.
|
Collection<String> |
getMonomerNames()
Returns a collection of the names of all
Monomer s in this
polymer. |
void |
removeMonomer(String name)
Removes a particular monomer, specified by its name.
|
String |
toString()
Returns a one line description of this IChemObject.
|
add, addAtom, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, singleElectrons, stateChanged, stereoElements
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
add, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, singleElectrons, stereoElements
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
stateChanged
public void addAtom(IAtom oAtom, IMonomer oMonomer)
public int getMonomerCount()
getMonomerCount
in interface IPolymer
public IMonomer getMonomer(String cName)
getMonomer
in interface IPolymer
cName
- The name of the monomer to look forpublic Collection<String> getMonomerNames()
Monomer
s in this
polymer.getMonomerNames
in interface IPolymer
Collection
of all the monomer names.public void removeMonomer(String name)
removeMonomer
in interface IPolymer
name
- The name of the monomer to removepublic String toString()
AtomContainer
toString
in interface IChemObject
toString
in class AtomContainer
public IPolymer clone() throws CloneNotSupportedException
AtomContainer
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 IAtomContainer
clone
in interface IChemObject
clone
in interface IPolymer
clone
in class AtomContainer
CloneNotSupportedException
- if the IChemObject cannot be clonedCopyright © 2021. All rights reserved.