Package org.openscience.cdk.silent
Class Mapping
- java.lang.Object
-
- org.openscience.cdk.silent.ChemObject
-
- org.openscience.cdk.silent.Mapping
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ICDKObject
,IChemObject
,IMapping
public class Mapping extends ChemObject implements Serializable, Cloneable, IMapping
A Mapping is an relation between two ChemObjects in a non-chemical entity. It is not a Bond, nor a Association, merely a relation. An example of such a mapping, is the mapping between corresponding atoms in a Reaction.- Author:
- Egon Willighagen
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- silent
- Keywords:
- reaction, atom mapping
- Created on:
- 2003-08-16
-
-
Constructor Summary
Constructors Constructor Description Mapping(IChemObject objectOne, IChemObject objectTwo)
Constructs an unconnected lone pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Clones thisMapping
and the mappedIChemObject
s.IChemObject
getChemObject(int pos)
Retrieves the first or second of the related IChemObjects.Iterable<IChemObject>
relatedChemObjects()
Returns an Iterable to the two IChemObjects.-
Methods inherited from class org.openscience.cdk.silent.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, toString, 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, toString
-
-
-
-
Constructor Detail
-
Mapping
public Mapping(IChemObject objectOne, IChemObject objectTwo)
Constructs an unconnected lone pair.- Parameters:
objectOne
- The first IChemObject of the mappingobjectTwo
- The second IChemObject of the mapping
-
-
Method Detail
-
relatedChemObjects
public Iterable<IChemObject> relatedChemObjects()
Returns an Iterable to the two IChemObjects. Iterable.remove() is not implemented.- Specified by:
relatedChemObjects
in interfaceIMapping
- Returns:
- An Iterable to two IChemObjects that define the mapping
-
getChemObject
public IChemObject getChemObject(int pos)
Retrieves the first or second of the related IChemObjects.- Specified by:
getChemObject
in interfaceIMapping
- Parameters:
pos
- The position of the IChemObject.- Returns:
- The IChemObject to retrieve.
-
clone
public Object clone() throws CloneNotSupportedException
Clones thisMapping
and the mappedIChemObject
s.- Specified by:
clone
in interfaceIChemObject
- Overrides:
clone
in classChemObject
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-