org.biojavax.ga.impl
Class AbstractOrganism

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by org.biojavax.ga.impl.AbstractOrganism
All Implemented Interfaces:
Changeable, Organism
Direct Known Subclasses:
SimpleOrganism

public abstract class AbstractOrganism
extends AbstractChangeable
implements Organism

Abstract implementation of Organism. Most implementations would want to inherit from here.

Since:
1.5
Version:
1.0
Author:
Mark Schreiber

Field Summary
 
Fields inherited from interface org.biojavax.ga.Organism
CHROMOSOMES, NAME
 
Constructor Summary
protected AbstractOrganism()
           
protected AbstractOrganism(Organism org, String name)
           
 
Method Summary
 SymbolList[] getChromosomes()
          Gets the organisms 'chromosome' sequences
 String getName()
          Gets the organisms name
abstract  boolean isHaploid()
          Is the organism Haploid?
protected abstract  void setChromImpl(SymbolList[] chromosomes)
           
 void setChromosomes(SymbolList[] chromosomes)
          Sets the organisms 'chromosome' sequences.
 void setName(String name)
          Sets the organisms name
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biojavax.ga.Organism
replicate
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 

Constructor Detail

AbstractOrganism

protected AbstractOrganism()

AbstractOrganism

protected AbstractOrganism(Organism org,
                           String name)
Method Detail

getChromosomes

public final SymbolList[] getChromosomes()
Description copied from interface: Organism
Gets the organisms 'chromosome' sequences

Specified by:
getChromosomes in interface Organism
Returns:
a SymbolList[]

setChromImpl

protected abstract void setChromImpl(SymbolList[] chromosomes)

setChromosomes

public final void setChromosomes(SymbolList[] chromosomes)
                          throws ChangeVetoException
Description copied from interface: Organism
Sets the organisms 'chromosome' sequences.

Specified by:
setChromosomes in interface Organism
Parameters:
chromosomes - a SymbolList[]
Throws:
ChangeVetoException - if the Chromosome collection of the Organism is unchangable

getName

public String getName()
Description copied from interface: Organism
Gets the organisms name

Specified by:
getName in interface Organism
Returns:
the name String

setName

public final void setName(String name)
                   throws ChangeVetoException
Description copied from interface: Organism
Sets the organisms name

Specified by:
setName in interface Organism
Parameters:
name - the name of the organism.
Throws:
ChangeVetoException - if the name may not be changed.

isHaploid

public abstract boolean isHaploid()
Description copied from interface: Organism
Is the organism Haploid?

Specified by:
isHaploid in interface Organism
Returns:
true if it is.