com.rubecula.darwin.domain.genetics
Class AlleleFactory

java.lang.Object
  extended by com.rubecula.darwin.domain.genetics.AlleleFactory

public final class AlleleFactory
extends java.lang.Object

Factory Class to create Allele objects. Applications can't change this class (it is final) but they can override the methods which call these methods.

Author:
Robin Hillyard

Method Summary
static Allele makeAllele(java.lang.Class<? extends Allele> clazz, java.lang.Object key, java.lang.Object value)
          TEST
static Allele makeDominanceAllele(java.lang.String identifier, boolean dominant)
          Construct a new Allele_Dominance with the given allele indexes TEST
static Allele makeSexAllele(boolean male)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeAllele

public static Allele makeAllele(java.lang.Class<? extends Allele> clazz,
                                java.lang.Object key,
                                java.lang.Object value)
TEST

Parameters:
clazz - the class of Allele to instantiate, which must have a constructor of form Allele(Object,Object).
key - the key
value - the value
Returns:
a newly constructed Object.

makeDominanceAllele

public static Allele makeDominanceAllele(java.lang.String identifier,
                                         boolean dominant)
Construct a new Allele_Dominance with the given allele indexes TEST

Parameters:
identifier - the identifier for a pair of dominant/recessive alleles (the identifiers should match but don't need to be in any particular case).
dominant - true if the allele is to be dominant, else recessive
Returns:
a newly constructed Allele_Dominance.

makeSexAllele

public static Allele makeSexAllele(boolean male)
Parameters:
male - XXX
Returns:
a newly constructed Allele_Sex object.


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.