Class Strand

All Implemented Interfaces:
Serializable, Cloneable, IAtomContainer, ICDKObject, IChemObject, IChemObjectListener, IStrand
Direct Known Subclasses:
DebugStrand, PDBStrand

public class Strand extends AtomContainer implements Serializable, IStrand
A Strand is an AtomContainer which stores additional strand specific informations for a group of Atoms.
Author:
Martin Eklund <martin.eklund@farmbio.uu.se>, Ola Spjuth <ola.spjuth@farmbio.uu.se>
See Also:
Source code:
main
Belongs to CDK module:
data
Created on:
2004-12-20
  • Constructor Details

    • Strand

      public Strand()
      Constructs a new Strand.
  • Method Details

    • getStrandName

      public String getStrandName()
      Retrieves the strand name.
      Specified by:
      getStrandName in interface IStrand
      Returns:
      The name of the Strand object
      See Also:
    • getStrandType

      public String getStrandType()
      Retrieves the strand type.
      Specified by:
      getStrandType in interface IStrand
      Returns:
      The type of the Strand object
      See Also:
    • setStrandName

      public void setStrandName(String cStrandName)
      Sets the name of the Strand object.
      Specified by:
      setStrandName in interface IStrand
      Parameters:
      cStrandName - The new name for this strand
      See Also:
    • setStrandType

      public void setStrandType(String cStrandType)
      Sets the type of the Strand object.
      Specified by:
      setStrandType in interface IStrand
      Parameters:
      cStrandType - The new type for this strand
      See Also:
    • addAtom

      public void addAtom(IAtom oAtom)
      Adds the atom oAtom without specifying a Monomer or a Strand. Therefore the atom gets added to a Monomer of type UNKNOWN in a Strand of type UNKNOWN.
      Specified by:
      addAtom in interface IAtomContainer
      Specified by:
      addAtom in interface IStrand
      Overrides:
      addAtom in class AtomContainer
      Parameters:
      oAtom - The atom to add
    • addAtom

      public void addAtom(IAtom oAtom, IMonomer oMonomer)
      Adds the atom oAtom to a specific Monomer.
      Specified by:
      addAtom in interface IStrand
      Parameters:
      oAtom - The atom to add
      oMonomer - The monomer the atom belongs to
    • getMonomerCount

      public int getMonomerCount()
      Returns the number of monomers present in the Strand.
      Specified by:
      getMonomerCount in interface IStrand
      Returns:
      number of monomers
    • getMonomer

      public IMonomer getMonomer(String cName)
      Retrieves a Monomer object by specifying its name.
      Specified by:
      getMonomer in interface IStrand
      Parameters:
      cName - The name of the monomer to look for
      Returns:
      The Monomer object which was asked for
    • getMonomerNames

      public Collection<String> getMonomerNames()
      Returns a collection of the names of all Monomers in this polymer.
      Specified by:
      getMonomerNames in interface IStrand
      Returns:
      a Collection of all the monomer names.
    • removeMonomer

      public void removeMonomer(String name)
      Removes a particular monomer, specified by its name.
      Specified by:
      removeMonomer in interface IStrand
      Parameters:
      name - The name of the monomer to remove
    • getMonomers

      public Map<String,IMonomer> getMonomers()
      Returns a hashtable containing the monomers in the strand.
      Specified by:
      getMonomers in interface IStrand
      Returns:
      hashtable containing the monomers in the strand.
    • toString

      public String toString()
      Description copied from class: AtomContainer
      Returns a one line description of this IChemObject.
      Specified by:
      toString in interface IChemObject
      Overrides:
      toString in class AtomContainer
      Returns:
      a String representation of this object
    • clone

      public IStrand clone() throws CloneNotSupportedException
      Description copied from class: AtomContainer
      Clones this IChemObject. It clones the identifier, flags, properties and pointer vectors. The ChemObjectListeners are not cloned, and neither is the content of the pointer vectors.
      Specified by:
      clone in interface IAtomContainer
      Specified by:
      clone in interface IChemObject
      Specified by:
      clone in interface IStrand
      Overrides:
      clone in class AtomContainer
      Returns:
      The cloned object
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned