public class SingleElectron extends ElectronContainer implements Serializable, ISingleElectron, Cloneable
AtomContainer radical = new AtomContainer();
Atom carbon = new Atom("C");
carbon.setImplicitHydrogens(3);
radical.addElectronContainer(new SingleElectron(carbon));
| Modifier and Type | Field and Description |
|---|---|
protected IAtom |
atom
The atom with which this single electron is associated.
|
protected int |
electronCount
Number of electron for this class is defined as one.
|
| Constructor and Description |
|---|
SingleElectron()
Constructs an single electron orbital with an associated Atom.
|
SingleElectron(IAtom atom)
Constructs an single electron orbital on an Atom.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this SingleElectron object, including a clone of the atom for which the
SingleElectron is defined.
|
boolean |
contains(IAtom atom)
Returns true if the given atom participates in this SingleElectron.
|
IAtom |
getAtom()
Returns the associated Atom.
|
Integer |
getElectronCount()
Returns the number of electrons in this SingleElectron.
|
void |
setAtom(IAtom atom)
Sets the associated Atom.
|
String |
toString()
Returns a one line string representation of this SingleElectron.
|
setElectronCountaddListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetElectronCountaddListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setPropertygetBuilderprotected final int electronCount
protected IAtom atom
public SingleElectron(IAtom atom)
atom - The atom to which the single electron belongs.public SingleElectron()
public Integer getElectronCount()
getElectronCount in interface IElectronContainergetElectronCount in class ElectronContainerElectronContainer.setElectronCount(java.lang.Integer)public IAtom getAtom()
getAtom in interface ISingleElectronsetAtom(org.openscience.cdk.interfaces.IAtom)public void setAtom(IAtom atom)
setAtom in interface ISingleElectronatom - the Atom this SingleElectron will be associated withgetAtom()public boolean contains(IAtom atom)
contains in interface ISingleElectronatom - The atom to be tested if it participates in this bondpublic String toString()
toString in interface IChemObjecttoString in class ElectronContainerpublic Object clone() throws CloneNotSupportedException
clone in interface IChemObjectclone in class ElectronContainerCloneNotSupportedException - if the IChemObject cannot be clonedCopyright © 2021. All rights reserved.