public class DebugRing extends Ring implements IRing
atomCount, atoms, bondCount, bonds, growArraySize, lonePairCount, lonePairs, singleElectronCount, singleElectrons, stereoElements
Constructor and Description |
---|
DebugRing() |
DebugRing(IAtomContainer container) |
DebugRing(int ringSize) |
DebugRing(int ringSize,
String elementSymbol) |
Modifier and Type | Method and Description |
---|---|
void |
add(IAtomContainer atomContainer)
Adds all atoms and electronContainers of a given atomcontainer to this
container.
|
void |
addAtom(IAtom atom)
Adds an atom to this container.
|
void |
addBond(IBond bond)
Adds a Bond to this AtomContainer.
|
void |
addBond(int atom1,
int atom2,
IBond.Order order)
Adds a bond to this container.
|
void |
addBond(int atom1,
int atom2,
IBond.Order order,
IBond.Stereo stereo)
Adds a bond to this container.
|
void |
addElectronContainer(IElectronContainer electronContainer)
Adds a ElectronContainer to this AtomContainer.
|
void |
addListener(IChemObjectListener col)
Use this to add yourself to this IChemObject as a listener.
|
void |
addLonePair(ILonePair ec)
Adds a lone pair to this AtomContainer.
|
void |
addLonePair(int atomID)
Adds a LonePair to this Atom.
|
void |
addProperties(Map<Object,Object> properties)
Sets the properties of this object.
|
void |
addSingleElectron(int atomID)
Adds a SingleElectron to this Atom.
|
void |
addSingleElectron(ISingleElectron ec)
Adds a single electron to this AtomContainer.
|
void |
addStereoElement(IStereoElement parity)
Adds a stereo element to this container.
|
Iterable<IAtom> |
atoms()
Returns an Iterable for looping over all atoms in this container.
|
Iterable<IBond> |
bonds()
Returns an Iterable for looping over all bonds in this container.
|
IRing |
clone()
Clones this
IChemObject . |
boolean |
contains(IAtom atom)
True, if the AtomContainer contains the given atom object.
|
boolean |
contains(IBond bond)
True, if the AtomContainer contains the given bond object.
|
boolean |
contains(IElectronContainer electronContainer)
True, if the AtomContainer contains the given ElectronContainer object.
|
boolean |
contains(ILonePair ec)
True, if the AtomContainer contains the given LonePair object.
|
boolean |
contains(ISingleElectron ec)
True, if the AtomContainer contains the given SingleElectron object.
|
Iterable<IElectronContainer> |
electronContainers()
Returns an Iterable for looping over all electron containers in this container.
|
IAtom |
getAtom(int idx)
Get the atom at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getAtomCount() . |
int |
getAtomCount()
Returns the number of Atoms in this Container.
|
int |
getAtomNumber(IAtom atom)
Returns the position of a given atom in the atoms array.
|
IBond |
getBond(IAtom atom1,
IAtom atom2)
Returns the bond that connects the two given atoms.
|
IBond |
getBond(int idx)
Get the bond at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getBondCount() . |
int |
getBondCount()
Returns the number of Bonds in this Container.
|
int |
getBondNumber(IAtom atom1,
IAtom atom2)
Returns the position of the bond between two given atoms in the
electronContainers array.
|
int |
getBondNumber(IBond bond)
Returns the position of a given bond in the electronContainers array.
|
int |
getBondOrderSum()
Returns the sum of all bond orders in the ring.
|
double |
getBondOrderSum(IAtom atom)
Returns the sum of the bond orders for a given Atom.
|
IChemObjectBuilder |
getBuilder()
Returns a
IChemObjectBuilder for the data classes that extend
this class. |
int |
getConnectedAtomsCount(IAtom atom)
Returns the number of connected atoms (explicit degree) to the
specified atom.
|
List<IAtom> |
getConnectedAtomsList(IAtom atom)
Returns the atoms connected connected to the specified atom by
a bond.
|
int |
getConnectedBondsCount(IAtom atom)
Returns the number of connected bonds (explicit degree) to the
specified atom.
|
List<IBond> |
getConnectedBondsList(IAtom atom)
Returns the bonds connected connected to the specified atom.
|
List<IElectronContainer> |
getConnectedElectronContainersList(IAtom atom)
Returns the electron containers (bonds, radicals, and lone pairs )
connected connected to the specified atom.
|
int |
getConnectedLonePairsCount(IAtom atom)
Returns the number of lone pairs connected to the specified atom.
|
List<ILonePair> |
getConnectedLonePairsList(IAtom atom)
Returns the lone pairs connected connected to the specified atom.
|
int |
getConnectedSingleElectronsCount(IAtom atom)
Returns the number of single electrons connected to the specified atom.
|
List<ISingleElectron> |
getConnectedSingleElectronsList(IAtom atom)
Returns the single electrons connected connected to the specified atom.
|
IElectronContainer |
getElectronContainer(int number)
Returns the ElectronContainer at position
number in the
container. |
int |
getElectronContainerCount()
Returns the number of ElectronContainers in this Container.
|
IAtom |
getFirstAtom()
Returns the atom at position 0 in the container.
|
boolean |
getFlag(int flagType)
Returns the value of a given flag.
|
boolean[] |
getFlags()
Returns the whole set of flags.
|
String |
getID()
Returns the identifier (ID) of this object.
|
IAtom |
getLastAtom()
Returns the atom at the last position in the container.
|
int |
getListenerCount()
Returns the number of ChemObjectListeners registered with this object.
|
ILonePair |
getLonePair(int idx)
Get the lone pair at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getLonePairCount() . |
int |
getLonePairCount()
Returns the number of LonePairs in this Container.
|
int |
getLonePairNumber(ILonePair bond)
Returns the position of a given lone pair in the lone pair array.
|
IBond.Order |
getMaximumBondOrder(IAtom atom)
Returns the maximum bond order that this atom currently has in the context
of this AtomContainer.
|
IBond.Order |
getMinimumBondOrder(IAtom atom)
Returns the minimum bond order that this atom currently has
in the context of this AtomContainer.
|
IBond |
getNextBond(IBond bond,
IAtom atom)
Returns the next bond in order, relative to a given bond and atom.
|
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties.
|
<T> T |
getProperty(Object description)
Returns a property for the IChemObject.
|
int |
getRingSize()
Returns the number of atoms\edges in this ring.
|
ISingleElectron |
getSingleElectron(int idx)
Get the single electron at the specified idx, the index should
be in the range 0 ≤ idx <
IAtomContainer.getSingleElectronCount() . |
int |
getSingleElectronCount()
Returns the number of the single electrons in this container.
|
int |
getSingleElectronNumber(ISingleElectron bond)
Returns the position of a given single electron in the single electron array.
|
Iterable<ILonePair> |
lonePairs()
Returns an Iterable for looping over all lone pairs in this container.
|
void |
notifyChanged()
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
notifyChanged(IChemObjectChangeEvent evt)
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
remove(IAtomContainer atomContainer)
Removes all atoms and electronContainers of a given atomcontainer from this
container.
|
void |
removeAllBonds()
Removes all Bonds from this container.
|
void |
removeAllElectronContainers()
Removes electronContainers from this container.
|
void |
removeAllElements()
Removes all atoms, bonds and stereo elements from this container.
|
void |
removeAtom(IAtom atom)
Safely remove an atom from the container.
|
void |
removeAtomOnly(IAtom atom)
Unsafely remove atom.
|
void |
removeAtomOnly(int position)
Unsafely remove atom at index.
|
IBond |
removeBond(IAtom atom1,
IAtom atom2)
Removes the bond that connects the two given atoms.
|
void |
removeBond(IBond bond)
Removes the bond from this container.
|
IBond |
removeBond(int pos)
Removes the bond at the given position from the AtomContainer.
|
void |
removeElectronContainer(IElectronContainer electronContainer)
Removes this ElectronContainer from this container.
|
IElectronContainer |
removeElectronContainer(int position)
Removes the bond at the given position from this container.
|
void |
removeListener(IChemObjectListener col)
Use this to remove a ChemObjectListener from the ListenerList of this
IChemObject.
|
void |
removeLonePair(ILonePair ec)
Removes the lone pair from the AtomContainer.
|
ILonePair |
removeLonePair(int pos)
Removes the lone pair at the given position from the AtomContainer.
|
void |
removeProperty(Object description)
Removes a property for a IChemObject.
|
ISingleElectron |
removeSingleElectron(int pos)
Removes the single electron at the given position from the AtomContainer.
|
void |
removeSingleElectron(ISingleElectron ec)
Removes the single electron from the AtomContainer.
|
void |
setAtom(int number,
IAtom atom)
Set the atom at
idx , the index must have an existing atom
and therefore be in the range 0 ≤ idx < mol.getAtomCount(). |
void |
setAtoms(IAtom[] atoms)
Sets the array of atoms of this AtomContainer.
|
void |
setFlag(int flagType,
boolean flagValue)
Sets the value of some flag.
|
void |
setFlags(boolean[] flagsNew)
Sets the whole set of flags.
|
void |
setID(String identifier)
Sets the identifier (ID) of this object.
|
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject.
|
Iterable<ISingleElectron> |
singleElectrons()
Returns an Iterable for looping over all single electrons in this container.
|
void |
stateChanged(IChemObjectChangeEvent event)
Called by objects to notify objects that implemented this interface
and registered with them as ChemObjectListeners.
|
Iterable<IStereoElement> |
stereoElements()
Returns the stereo elements defined for this atom container.
|
getConnectedBondsCount, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, removeAtom, removeAtomAndConnectedElectronContainers, setBonds, setStereoElements, setTitle
compare, getFlagValue, getNotification, getProperty, setNotification, setProperties, shallowCopy
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConnectedBondsCount, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, removeAtom, removeAtomAndConnectedElectronContainers, setBonds, setStereoElements, setTitle
getFlagValue, getNotification, getProperty, setNotification, setProperties, toString
public DebugRing()
public DebugRing(int ringSize, String elementSymbol)
public DebugRing(int ringSize)
public DebugRing(IAtomContainer container)
public void addStereoElement(IStereoElement parity)
addStereoElement
in interface IAtomContainer
addStereoElement
in class AtomContainer
parity
- The new IStereoElement
for this containerIAtomContainer.stereoElements()
public Iterable<IStereoElement> stereoElements()
stereoElements
in interface IAtomContainer
stereoElements
in class AtomContainer
Iterable
of IStereoElement
s.IAtomContainer.addStereoElement(IStereoElement)
public void setAtoms(IAtom[] atoms)
setAtoms
in interface IAtomContainer
setAtoms
in class AtomContainer
atoms
- The array of atoms to be assigned to this AtomContainerIAtomContainer.atoms()
public void setAtom(int number, IAtom atom)
idx
, the index must have an existing atom
and therefore be in the range 0 ≤ idx < mol.getAtomCount().setAtom
in interface IAtomContainer
setAtom
in class AtomContainer
number
- The index of the atom to be set.atom
- The atom to be stored at position idx
IAtomContainer.getAtom(int)
public IAtom getAtom(int idx)
IAtomContainer.getAtomCount()
.getAtom
in interface IAtomContainer
getAtom
in class AtomContainer
idx
- atom indexIAtomContainer.setAtom(int, org.openscience.cdk.interfaces.IAtom)
public IBond getBond(int idx)
IAtomContainer.getBondCount()
.getBond
in interface IAtomContainer
getBond
in class AtomContainer
idx
- bond indexpublic ILonePair getLonePair(int idx)
IAtomContainer.getLonePairCount()
.getLonePair
in interface IAtomContainer
getLonePair
in class AtomContainer
idx
- lone pair indexpublic ISingleElectron getSingleElectron(int idx)
IAtomContainer.getSingleElectronCount()
.getSingleElectron
in interface IAtomContainer
getSingleElectron
in class AtomContainer
idx
- single electron indexpublic Iterable<IAtom> atoms()
atoms
in interface IAtomContainer
atoms
in class AtomContainer
public Iterable<IBond> bonds()
bonds
in interface IAtomContainer
bonds
in class AtomContainer
public Iterable<ILonePair> lonePairs()
lonePairs
in interface IAtomContainer
lonePairs
in class AtomContainer
public Iterable<ISingleElectron> singleElectrons()
singleElectrons
in interface IAtomContainer
singleElectrons
in class AtomContainer
public Iterable<IElectronContainer> electronContainers()
electronContainers
in interface IAtomContainer
electronContainers
in class AtomContainer
public IAtom getFirstAtom()
getFirstAtom
in interface IAtomContainer
getFirstAtom
in class AtomContainer
public IAtom getLastAtom()
getLastAtom
in interface IAtomContainer
getLastAtom
in class AtomContainer
public int getAtomNumber(IAtom atom)
getAtomNumber
in interface IAtomContainer
getAtomNumber
in class AtomContainer
atom
- The atom to be soughtpublic int getBondNumber(IAtom atom1, IAtom atom2)
getBondNumber
in interface IAtomContainer
getBondNumber
in class AtomContainer
atom1
- The first atomatom2
- The second atompublic int getBondNumber(IBond bond)
getBondNumber
in interface IAtomContainer
getBondNumber
in class AtomContainer
bond
- The bond to be soughtpublic int getLonePairNumber(ILonePair bond)
getLonePairNumber
in interface IAtomContainer
getLonePairNumber
in class AtomContainer
bond
- The lone pair to be soughtpublic int getSingleElectronNumber(ISingleElectron bond)
getSingleElectronNumber
in interface IAtomContainer
getSingleElectronNumber
in class AtomContainer
bond
- The single electron to be soughtpublic IElectronContainer getElectronContainer(int number)
number
in the
container.getElectronContainer
in interface IAtomContainer
getElectronContainer
in class AtomContainer
number
- The position of the ElectronContainer to be returned.number
.IAtomContainer.addElectronContainer(IElectronContainer)
public IBond getBond(IAtom atom1, IAtom atom2)
getBond
in interface IAtomContainer
getBond
in class AtomContainer
atom1
- The first atomatom2
- The second atompublic int getAtomCount()
getAtomCount
in interface IAtomContainer
getAtomCount
in class AtomContainer
public int getBondCount()
getBondCount
in interface IAtomContainer
getBondCount
in class AtomContainer
public int getLonePairCount()
getLonePairCount
in interface IAtomContainer
getLonePairCount
in class AtomContainer
public int getSingleElectronCount()
getSingleElectronCount
in interface IAtomContainer
getSingleElectronCount
in class AtomContainer
public int getElectronContainerCount()
getElectronContainerCount
in interface IAtomContainer
getElectronContainerCount
in class AtomContainer
public List<IAtom> getConnectedAtomsList(IAtom atom)
getConnectedAtomsList
in interface IAtomContainer
getConnectedAtomsList
in class AtomContainer
atom
- the atompublic List<IBond> getConnectedBondsList(IAtom atom)
getConnectedBondsList
in interface IAtomContainer
getConnectedBondsList
in class AtomContainer
atom
- the atompublic List<ILonePair> getConnectedLonePairsList(IAtom atom)
getConnectedLonePairsList
in interface IAtomContainer
getConnectedLonePairsList
in class AtomContainer
atom
- the atompublic List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom)
getConnectedSingleElectronsList
in interface IAtomContainer
getConnectedSingleElectronsList
in class AtomContainer
atom
- the atompublic List<IElectronContainer> getConnectedElectronContainersList(IAtom atom)
getConnectedElectronContainersList
in interface IAtomContainer
getConnectedElectronContainersList
in class AtomContainer
atom
- the atompublic int getConnectedAtomsCount(IAtom atom)
getConnectedAtomsCount
in interface IAtomContainer
getConnectedAtomsCount
in class AtomContainer
atom
- the atompublic int getConnectedBondsCount(IAtom atom)
getConnectedBondsCount
in interface IAtomContainer
getConnectedBondsCount
in class AtomContainer
atom
- the atompublic int getConnectedLonePairsCount(IAtom atom)
getConnectedLonePairsCount
in interface IAtomContainer
getConnectedLonePairsCount
in class AtomContainer
atom
- the atompublic int getConnectedSingleElectronsCount(IAtom atom)
getConnectedSingleElectronsCount
in interface IAtomContainer
getConnectedSingleElectronsCount
in class AtomContainer
atom
- the atompublic double getBondOrderSum(IAtom atom)
getBondOrderSum
in interface IAtomContainer
getBondOrderSum
in class AtomContainer
atom
- The atompublic IBond.Order getMaximumBondOrder(IAtom atom)
IBond.Order.SINGLE
, otherwise the bond is unset
IBond.Order.UNSET
.getMaximumBondOrder
in interface IAtomContainer
getMaximumBondOrder
in class AtomContainer
atom
- The atompublic IBond.Order getMinimumBondOrder(IAtom atom)
IBond.Order.SINGLE
, otherwise the bond is unset
IBond.Order.UNSET
.getMinimumBondOrder
in interface IAtomContainer
getMinimumBondOrder
in class AtomContainer
atom
- The atompublic void add(IAtomContainer atomContainer)
add
in interface IAtomContainer
add
in class AtomContainer
atomContainer
- The atomcontainer to be addedpublic void addAtom(IAtom atom)
addAtom
in interface IAtomContainer
addAtom
in class AtomContainer
atom
- The atom to be added to this containerpublic void addBond(IBond bond)
addBond
in interface IAtomContainer
addBond
in class AtomContainer
bond
- The bond to added to this containerpublic void addLonePair(ILonePair ec)
addLonePair
in interface IAtomContainer
addLonePair
in class AtomContainer
ec
- The LonePair to added to this containerpublic void addSingleElectron(ISingleElectron ec)
addSingleElectron
in interface IAtomContainer
addSingleElectron
in class AtomContainer
ec
- The SingleElectron to added to this containerpublic void addElectronContainer(IElectronContainer electronContainer)
addElectronContainer
in interface IAtomContainer
addElectronContainer
in class AtomContainer
electronContainer
- The ElectronContainer to added to this containerpublic void remove(IAtomContainer atomContainer)
remove
in interface IAtomContainer
remove
in class AtomContainer
atomContainer
- The atomcontainer to be removedpublic IElectronContainer removeElectronContainer(int position)
removeElectronContainer
in interface IAtomContainer
removeElectronContainer
in class AtomContainer
position
- The position of the bond in the electronContainers arraypublic void removeElectronContainer(IElectronContainer electronContainer)
removeElectronContainer
in interface IAtomContainer
removeElectronContainer
in class AtomContainer
electronContainer
- The electronContainer to be removedpublic void removeAtomOnly(int position)
removeAtomOnly
in interface IAtomContainer
removeAtomOnly
in class AtomContainer
position
- The position of the atom to be removed.public void removeAtomOnly(IAtom atom)
removeAtomOnly
in interface IAtomContainer
removeAtomOnly
in class AtomContainer
atom
- The atom to be removedpublic IBond removeBond(int pos)
removeBond
in interface IAtomContainer
removeBond
in class AtomContainer
pos
- The position of the bond to be removed.public IBond removeBond(IAtom atom1, IAtom atom2)
removeBond
in interface IAtomContainer
removeBond
in class AtomContainer
atom1
- The first atomatom2
- The second atompublic void removeBond(IBond bond)
removeBond
in interface IAtomContainer
removeBond
in class AtomContainer
bond
- The bond to be removed.public ILonePair removeLonePair(int pos)
removeLonePair
in interface IAtomContainer
removeLonePair
in class AtomContainer
pos
- The position of the LonePair to be removed.public void removeLonePair(ILonePair ec)
removeLonePair
in interface IAtomContainer
removeLonePair
in class AtomContainer
ec
- The LonePair to be removed.public ISingleElectron removeSingleElectron(int pos)
removeSingleElectron
in interface IAtomContainer
removeSingleElectron
in class AtomContainer
pos
- The position of the SingleElectron to be removed.public void removeSingleElectron(ISingleElectron ec)
removeSingleElectron
in interface IAtomContainer
removeSingleElectron
in class AtomContainer
ec
- The SingleElectron to be removed.public void removeAtom(IAtom atom)
IAtomContainer.remove(IAtomContainer)
.
removeAtom
in interface IAtomContainer
removeAtom
in class AtomContainer
atom
- the atom to be removedpublic void removeAllElements()
removeAllElements
in interface IAtomContainer
removeAllElements
in class AtomContainer
public void removeAllElectronContainers()
removeAllElectronContainers
in interface IAtomContainer
removeAllElectronContainers
in class AtomContainer
public void removeAllBonds()
removeAllBonds
in interface IAtomContainer
removeAllBonds
in class AtomContainer
public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo)
addBond
in interface IAtomContainer
addBond
in class AtomContainer
atom1
- Id of the first atom of the Bond in [0,..]atom2
- Id of the second atom of the Bond in [0,..]order
- Bondorderstereo
- Stereochemical orientationpublic void addBond(int atom1, int atom2, IBond.Order order)
addBond
in interface IAtomContainer
addBond
in class AtomContainer
atom1
- Id of the first atom of the Bond in [0,..]atom2
- Id of the second atom of the Bond in [0,..]order
- Bondorderpublic void addLonePair(int atomID)
addLonePair
in interface IAtomContainer
addLonePair
in class AtomContainer
atomID
- The atom number to which the LonePair is added in [0,..]public void addSingleElectron(int atomID)
addSingleElectron
in interface IAtomContainer
addSingleElectron
in class AtomContainer
atomID
- The atom number to which the SingleElectron is added in [0,..]public boolean contains(IAtom atom)
contains
in interface IAtomContainer
contains
in class AtomContainer
atom
- the atom this AtomContainer is searched forpublic boolean contains(IBond bond)
contains
in interface IAtomContainer
contains
in class AtomContainer
bond
- the bond this AtomContainer is searched forpublic boolean contains(ILonePair ec)
contains
in interface IAtomContainer
contains
in class AtomContainer
ec
- the LonePair this AtomContainer is searched forpublic boolean contains(ISingleElectron ec)
contains
in interface IAtomContainer
contains
in class AtomContainer
ec
- the SingleElectron this AtomContainer is searched forpublic boolean contains(IElectronContainer electronContainer)
contains
in interface IAtomContainer
contains
in class AtomContainer
electronContainer
- ElectronContainer that is searched forpublic void addListener(IChemObjectListener col)
addListener
in interface IChemObject
addListener
in class ChemObject
col
- the ChemObjectListenerChemObject.removeListener(org.openscience.cdk.interfaces.IChemObjectListener)
public int getListenerCount()
getListenerCount
in interface IChemObject
getListenerCount
in class ChemObject
public void removeListener(IChemObjectListener col)
removeListener
in interface IChemObject
removeListener
in class ChemObject
col
- The ChemObjectListener to be removedChemObject.addListener(org.openscience.cdk.interfaces.IChemObjectListener)
public void notifyChanged()
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
public void notifyChanged(IChemObjectChangeEvent evt)
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
evt
- A ChemObjectChangeEvent pointing to the source of where
the change happenedpublic void setProperty(Object description, Object property)
setProperty
in interface IChemObject
setProperty
in class ChemObject
description
- An object description of the property (most likely a
unique string)property
- An object with the property itselfChemObject.getProperty(java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public void removeProperty(Object description)
removeProperty
in interface IChemObject
removeProperty
in class ChemObject
description
- The object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.getProperty(java.lang.Object)
public <T> T getProperty(Object description)
getProperty
in interface IChemObject
getProperty
in class ChemObject
T
- generic return typedescription
- An object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public Map<Object,Object> getProperties()
getProperties
in interface IChemObject
getProperties
in class ChemObject
ChemObject.addProperties(java.util.Map<java.lang.Object, java.lang.Object>)
public String getID()
getID
in interface IChemObject
getID
in class ChemObject
ChemObject.setID(java.lang.String)
public void setID(String identifier)
setID
in interface IChemObject
setID
in class ChemObject
identifier
- a String representing the ID valueChemObject.getID()
public void setFlag(int flagType, boolean flagValue)
CDKConstants.ISAROMATIC
or CDKConstants.VISITED
). The flags are
intrinsic internal properties and should not be used to store custom
values, please use IChemObject.setProperty(Object, Object)
.
// set this chem object to be aromatic
chemObject.setFlag(CDKConstants.ISAROMATIC, Boolean.TRUE);
// ...
// indicate we have visited this chem object
chemObject.setFlag(CDKConstants.VISITED, Boolean.TRUE);
setFlag
in interface IChemObject
setFlag
in class ChemObject
flagType
- flag to set the value forflagValue
- value to assign to flagIChemObject.getFlag(int)
,
CDKConstants
public boolean getFlag(int flagType)
CDKConstants.ISAROMATIC
).
if(chemObject.getFlag(CDKConstants.ISAROMATIC)){
// handle aromatic flag on this chem object
}
getFlag
in interface IChemObject
getFlag
in class ChemObject
flagType
- flag to retrieve the value offlag_type
is setIChemObject.setFlag(int, boolean)
,
CDKConstants
public void addProperties(Map<Object,Object> properties)
addProperties
in interface IChemObject
addProperties
in class ChemObject
properties
- a Hashtable specifying the property valuesChemObject.getProperties()
public void setFlags(boolean[] flagsNew)
setFlags
in interface IChemObject
setFlags
in class ChemObject
flagsNew
- the new flags.ChemObject.getFlags()
public boolean[] getFlags()
getFlags
in interface IChemObject
getFlags
in class ChemObject
ChemObject.setFlags(boolean[])
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 Ring
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic IChemObjectBuilder getBuilder()
IChemObjectBuilder
for the data classes that extend
this class.getBuilder
in interface ICDKObject
getBuilder
in class ChemObject
IChemObjectBuilder
matching this ICDKObject
public int getRingSize()
getRingSize
in interface IRing
getRingSize
in class Ring
public IBond getNextBond(IBond bond, IAtom atom)
getNextBond
in interface IRing
getNextBond
in class Ring
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
getBondOrderSum
in class Ring
public void stateChanged(IChemObjectChangeEvent event)
stateChanged
in interface IChemObjectListener
stateChanged
in class AtomContainer
event
- a ChemObjectChangeEvent objectCopyright © 2021. All rights reserved.