public class Association extends ElectronContainer implements Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected int |
atomCount |
protected IAtom[] |
atoms
The atoms which take part in the association.
|
protected int |
electronCount
Number of electrons in the association.
|
| Constructor and Description |
|---|
Association()
Constructs an empty association.
|
Association(IAtom atom1,
IAtom atom2)
Constructs an association between two Atom's.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(IAtom atom)
Returns true if the given atom participates in this Association.
|
IAtom |
getAtomAt(int position)
Returns an Atom from this Association.
|
int |
getAtomCount()
Returns the number of Atoms in this Association.
|
IAtom[] |
getAtoms()
Returns the array of atoms making up this Association.
|
Integer |
getElectronCount()
Returns the number of electrons in a Association.
|
void |
setAtomAt(IAtom atom,
int position)
Sets an Atom in this Association.
|
void |
setAtoms(IAtom[] atoms)
Sets the array of atoms making up this Association.
|
String |
toString()
Returns a one line string representation of this Container.
|
clone, 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, waitaddListener, 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[] atoms
protected int atomCount
public Association(IAtom atom1, IAtom atom2)
atom1 - An atom to be associated with another atomatom2 - An atom to be associated with another atomAtompublic Association()
Atompublic IAtom[] getAtoms()
setAtoms(org.openscience.cdk.interfaces.IAtom[])public void setAtoms(IAtom[] atoms)
atoms - An array of atoms that forms this AssociationgetAtoms()public int getAtomCount()
public Integer getElectronCount()
getElectronCount in interface IElectronContainergetElectronCount in class ElectronContainerElectronContainer.setElectronCount(java.lang.Integer)public IAtom getAtomAt(int position)
position - The position in this bond where the atom issetAtomAt(org.openscience.cdk.interfaces.IAtom, int)public boolean contains(IAtom atom)
atom - The atom to be tested if it participates in this Associationpublic void setAtomAt(IAtom atom, int position)
atom - The atom to be setposition - The position in this Association where the atom is to be insertedgetAtomAt(int)public String toString()
toString in interface IChemObjecttoString in class ElectronContainerCopyright © 2021. All rights reserved.