Class 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 Detail

      • 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 Detail

      • 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.