org.concord.biologica.engine
Interface INucleicAcidHolder

All Known Implementing Classes:
NucleicAcid, OrganismAllele, SpeciesAllele

public interface INucleicAcidHolder

This interface presents the API for a holder of nucleic acid.

Examples of such holders include alleles, other nucleic acids, chromosomes, etc.

Version:
$Revision: 1.1.1.1 $ $Date: 2001/04/28 00:39:13 $
Author:
$Author: ed $

Method Summary
 void addNucleicAcid(INucleicAcid aNucleicAcid)
          Adds a nucleic acid to the holder.
 void endElement(java.lang.String anElementName)
          Handle notification that the parsing of the given element has ended.
 int getID()
          Returns the ID of this object.
 World getWorld()
          Returns the world containing this holder
 boolean removeNucleicAcid(INucleicAcid aNucleicAcid)
          Removes a nucleic acid from the holder.
 

Method Detail

getID

public int getID()
Returns the ID of this object. Duplicate of the method in Engine.

Returns:
int - id of this object

addNucleicAcid

public void addNucleicAcid(INucleicAcid aNucleicAcid)
Adds a nucleic acid to the holder.

Package protected because this is only called from the nucleic acid's constructor. Creating a nucleic acid automatically adds it to the holder via this method.

Parameters:
aNucleicAcid - INucleicAcid - a new nucleic acid, may not be null
Throws:
java.lang.IllegalArgumentException - - input argument illegal

removeNucleicAcid

public boolean removeNucleicAcid(INucleicAcid aNucleicAcid)
Removes a nucleic acid from the holder.

Package protected because this is only called from the nucleic acid's delete method. Deleting a nucleic acid automatically removes it from the holder via this method.

Parameters:
aNucleicAcid - INucleicAcid - a nucleic acid, may not be null
Returns:
boolean indicating whether or not the nucleic acid was found and removed
Throws:
java.lang.IllegalArgumentException - - input argument illegal

getWorld

public World getWorld()
Returns the world containing this holder
Returns:
World - world containing this object

endElement

public void endElement(java.lang.String anElementName)
                throws org.xml.sax.SAXException
Handle notification that the parsing of the given element has ended.
Parameters:
anElementName - String - the element name