Class Strand

    • Constructor Detail

      • Strand

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

      • 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:
        getStrandName()
      • 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:
        getStrandType()
      • 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.