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.
|
setElectronCount
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
setElectronCount
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
protected 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 IElectronContainer
getElectronCount
in class ElectronContainer
ElectronContainer.setElectronCount(java.lang.Integer)
public IAtom getAtom()
getAtom
in interface ISingleElectron
setAtom(org.openscience.cdk.interfaces.IAtom)
public void setAtom(IAtom atom)
setAtom
in interface ISingleElectron
atom
- the Atom this SingleElectron will be associated withgetAtom()
public boolean contains(IAtom atom)
contains
in interface ISingleElectron
atom
- The atom to be tested if it participates in this bondpublic String toString()
toString
in interface IChemObject
toString
in class ElectronContainer
public Object clone() throws CloneNotSupportedException
clone
in interface IChemObject
clone
in class ElectronContainer
CloneNotSupportedException
- if the IChemObject cannot be clonedCopyright © 2017. All Rights Reserved.