public class Ring extends AtomContainer implements Serializable, IRing
atomCount, atoms, bondCount, bonds, growArraySize, lonePairCount, lonePairs, singleElectronCount, singleElectrons, stereoElements
Constructor and Description |
---|
Ring()
Constructs an empty ring.
|
Ring(IAtomContainer atomContainer)
Constructs a ring from the atoms in an IAtomContainer object.
|
Ring(int ringSize)
Constructs an empty ring that will have a certain size.
|
Ring(int ringSize,
String elementSymbol)
Constructs a ring that will have a certain number of atoms of the given elements.
|
Modifier and Type | Method and Description |
---|---|
IRing |
clone()
Clones this
IChemObject . |
int |
getBondOrderSum()
Returns the sum of all bond orders in the ring.
|
IBond |
getNextBond(IBond bond,
IAtom atom)
Returns the next bond in order, relative to a given bond and atom.
|
int |
getRingSize()
Returns the number of atoms\edges in this ring.
|
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, 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, 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 Ring()
public Ring(IAtomContainer atomContainer)
atomContainer
- The IAtomContainer object containing the atoms to form the ringpublic Ring(int ringSize, String elementSymbol)
ringSize
- The number of atoms and bonds the ring will haveelementSymbol
- The element of the atoms the ring will havepublic Ring(int ringSize)
ringSize
- The size (number of atoms) the ring will havepublic int getRingSize()
getRingSize
in interface IRing
public IBond getNextBond(IBond bond, IAtom atom)
getNextBond
in interface IRing
bond
- A bond for which an atom from a consecutive bond is soughtatom
- A atom from the bond above to assign a search directionpublic int getBondOrderSum()
getBondOrderSum
in interface IRing
public IRing clone() throws CloneNotSupportedException
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 IRing
clone
in class AtomContainer
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic String toString()
AtomContainer
toString
in interface IChemObject
toString
in class AtomContainer
Copyright © 2021. All rights reserved.