Class Mapping

All Implemented Interfaces:
Serializable, Cloneable, ICDKObject, IChemObject, IMapping
Direct Known Subclasses:
DebugMapping

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:
Source code:
main
Belongs to CDK module:
data
Keywords:
reaction, atom mapping
Created on:
2003-08-16
  • Constructor Details

    • Mapping

      public Mapping(IChemObject objectOne, IChemObject objectTwo)
      Constructs an unconnected lone pair.
      Parameters:
      objectOne - The first IChemObject of the mapping
      objectTwo - The second IChemObject of the mapping
  • Method Details

    • relatedChemObjects

      public Iterable<IChemObject> relatedChemObjects()
      Returns an Iterable to the two IChemObjects. Iterable.remove() is not implemented.
      Specified by:
      relatedChemObjects in interface IMapping
      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 interface IMapping
      Parameters:
      pos - The position of the IChemObject.
      Returns:
      The IChemObject to retrieve.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clones this Mapping and the mapped IChemObjects.
      Specified by:
      clone in interface IChemObject
      Overrides:
      clone in class ChemObject
      Returns:
      The cloned object
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned