Package org.openscience.cdk
Class Association
java.lang.Object
org.openscience.cdk.ChemObject
org.openscience.cdk.ElectronContainer
org.openscience.cdk.Association
- All Implemented Interfaces:
Serializable
,Cloneable
,ICDKObject
,IChemObject
,IElectronContainer
Base class for storing interactions like hydrogen bonds and ionic interactions.
The ElectronContainer contains zero electrons by default.
- See Also:
- Source code:
- main
- Belongs to CDK module:
- extra
- Keywords:
- orbital, association, bond
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected IAtom[]
The atoms which take part in the association.protected final int
Number of electrons in the association. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty association.Association
(IAtom atom1, IAtom atom2) Constructs an association between two Atom's. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the given atom participates in this Association.getAtomAt
(int position) Returns an Atom from this Association.int
Returns the number of Atoms in this Association.IAtom[]
getAtoms()
Returns the array of atoms making up this Association.Returns the number of electrons in a Association.void
Sets an Atom in this Association.void
Sets the array of atoms making up this Association.toString()
Returns a one line string representation of this Container.Methods inherited from class org.openscience.cdk.ElectronContainer
clone, setElectronCount
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Field Details
-
electronCount
protected final int electronCountNumber of electrons in the association.- See Also:
-
atoms
The atoms which take part in the association. -
atomCount
protected int atomCount
-
-
Constructor Details
-
Method Details
-
getAtoms
Returns the array of atoms making up this Association.- Returns:
- An array of atoms participating in this Association
- See Also:
-
setAtoms
Sets the array of atoms making up this Association.- Parameters:
atoms
- An array of atoms that forms this Association- See Also:
-
getAtomCount
public int getAtomCount()Returns the number of Atoms in this Association.- Returns:
- The number of Atoms in this Association
-
getElectronCount
Returns the number of electrons in a Association.- Specified by:
getElectronCount
in interfaceIElectronContainer
- Overrides:
getElectronCount
in classElectronContainer
- Returns:
- The number of electrons in a Association.
- See Also:
-
getAtomAt
Returns an Atom from this Association.- Parameters:
position
- The position in this bond where the atom is- Returns:
- The atom at the specified position
- See Also:
-
contains
Returns true if the given atom participates in this Association.- Parameters:
atom
- The atom to be tested if it participates in this Association- Returns:
- true if the atom participates in this Association
-
setAtomAt
Sets an Atom in this Association.- Parameters:
atom
- The atom to be setposition
- The position in this Association where the atom is to be inserted- See Also:
-
toString
Returns a one line string representation of this Container. This method is conform RFC #9.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classElectronContainer
- Returns:
- The string representation of this Container
-