Class RingSet

All Implemented Interfaces:
Serializable, Cloneable, IAtomContainerSet, ICDKObject, IChemObject, IChemObjectListener, IRingSet
Direct Known Subclasses:
DebugRingSet

public class RingSet extends AtomContainerSet implements Serializable, IRingSet, Cloneable
Maintains a set of Ring objects.
See Also:
Source code:
main
Belongs to CDK module:
data
Keywords:
ring, set of
  • Constructor Details

    • RingSet

      public RingSet()
      The constructor.
  • Method Details

    • getRings

      public IRingSet getRings(IBond bond)
      Returns a vector of all rings that this bond is part of.
      Specified by:
      getRings in interface IRingSet
      Parameters:
      bond - The bond to be checked
      Returns:
      A vector of all rings that this bond is part of
    • getRings

      public IRingSet getRings(IAtom atom)
      Returns a vector of all rings that this atom is part of.
      Specified by:
      getRings in interface IRingSet
      Parameters:
      atom - The atom to be checked
      Returns:
      A vector of all rings that this bond is part of
    • getConnectedRings

      public IRingSet getConnectedRings(IRing ring)
      Returns all the rings in the RingSet that share one or more atoms with a given ring.
      Specified by:
      getConnectedRings in interface IRingSet
      Parameters:
      ring - A ring with which all return rings must share one or more atoms
      Returns:
      All the rings that share one or more atoms with a given ring.
    • add

      public void add(IRingSet ringSet)
      Adds all rings of another RingSet if they are not already part of this ring set. If you want to add a single ring to the set use AtomContainerSet.addAtomContainer(org.openscience.cdk.interfaces.IAtomContainer)
      Specified by:
      add in interface IRingSet
      Parameters:
      ringSet - the ring set to be united with this one.
    • contains

      public boolean contains(IAtom atom)
      True, if at least one of the rings in the ringset contains the given atom.
      Specified by:
      contains in interface IRingSet
      Parameters:
      atom - Atom to check
      Returns:
      true, if the ringset contains the atom
    • contains

      public boolean contains(IAtomContainer ring)
      Checks for presence of a ring in this RingSet.
      Specified by:
      contains in interface IRingSet
      Parameters:
      ring - The ring to check
      Returns:
      true if ring is part of RingSet
    • clone

      public Object clone() throws CloneNotSupportedException
      Clones this RingSet including the Rings.
      Specified by:
      clone in interface IChemObject
      Overrides:
      clone in class AtomContainerSet
      Returns:
      The cloned object
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned
    • toString

      public String toString()
      Returns the String representation of this RingSet.
      Specified by:
      toString in interface IChemObject
      Overrides:
      toString in class AtomContainerSet
      Returns:
      The String representation of this RingSet