@TestClass(value="org.openscience.cdk.AssociationTest") public class Association extends ElectronContainer implements Serializable, Cloneable
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, setElectronCount
addListener, compare, getBuilder, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
@TestMethod(value="testAssociation_IAtom_IAtom") public Association(IAtom atom1, IAtom atom2)
atom1
- An atom to be associated with another atomatom2
- An atom to be associated with another atomAtom
@TestMethod(value="testAssociation") public Association()
Atom
@TestMethod(value="testGetAtoms") public IAtom[] getAtoms()
setAtoms(org.openscience.cdk.interfaces.IAtom[])
@TestMethod(value="testSetAtoms") public void setAtoms(IAtom[] atoms)
atoms
- An array of atoms that forms this AssociationgetAtoms()
@TestMethod(value="testGetAtomCount") public int getAtomCount()
@TestMethod(value="testGetAtomAt") public Integer getElectronCount()
getElectronCount
in interface IElectronContainer
getElectronCount
in class ElectronContainer
ElectronContainer.setElectronCount(java.lang.Integer)
@TestMethod(value="testGetAtomAt") public IAtom getAtomAt(int position)
position
- The position in this bond where the atom issetAtomAt(org.openscience.cdk.interfaces.IAtom, int)
@TestMethod(value="testContains") public boolean contains(IAtom atom)
atom
- The atom to be tested if it participates in this Association@TestMethod(value="testSetAtomAt") public 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)
@TestMethod(value="testToString") public String toString()
toString
in interface IChemObject
toString
in class ElectronContainer