public class LonePair extends ElectronContainer implements Serializable, ILonePair, Cloneable
Modifier and Type | Field and Description |
---|---|
protected IAtom |
atom
The atom with which this lone pair is associated.
|
protected int |
electronCount
Number of electrons in the lone pair.
|
Constructor and Description |
---|
LonePair()
Constructs an unconnected lone pair.
|
LonePair(IAtom atom)
Constructs an lone pair on an Atom.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this LonePair object, including a clone of the atom for which the
lone pair is defined.
|
boolean |
contains(IAtom atom)
Returns true if the given atom participates in this lone pair.
|
IAtom |
getAtom()
Returns the associated Atom.
|
Integer |
getElectronCount()
Returns the number of electrons in a LonePair.
|
void |
setAtom(IAtom atom)
Sets the associated Atom.
|
String |
toString()
Returns a one line string representation of this LonePair.
|
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 LonePair()
public LonePair(IAtom atom)
atom
- Atom to which this lone pair is connectedpublic Integer getElectronCount()
getElectronCount
in interface IElectronContainer
getElectronCount
in class ElectronContainer
ElectronContainer.setElectronCount(java.lang.Integer)
public IAtom getAtom()
getAtom
in interface ILonePair
setAtom(org.openscience.cdk.interfaces.IAtom)
public void setAtom(IAtom atom)
public boolean contains(IAtom atom)
public Object clone() throws CloneNotSupportedException
clone
in interface IChemObject
clone
in class ElectronContainer
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic String toString()
toString
in interface IChemObject
toString
in class ElectronContainer
Copyright © 2021. All rights reserved.