com.rubecula.darwin.domain.environment
Class Trait_Discrete

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.environment.Trait_
          extended by com.rubecula.darwin.domain.environment.Trait_Discrete
All Implemented Interfaces:
Censusible, Expression, Trait, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString

public final class Trait_Discrete
extends Trait_

Lifespan: transient. Concrete implementation of discrete Trait, i.e. a trait that can take one of a finite set of values (called variants). Such variants must be registered (added) to the phenotypic character before they can be referenced. Consider naming in honor of Reginald Punnett.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Method Summary
 java.lang.Object getKey()
          For a discrete trait, we simply return this.
 
Methods inherited from class com.rubecula.darwin.domain.environment.Trait_
censusMe, equals, getCensusibleChildren, getCharacter, getCharacterKey, getIdentifier, getPhenotype, getValue, getVariant, getVariantKey, hashCode, setPhenotype
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.tostring0.IToString
toString, toStringBrief, toStringId
 

Method Detail

getKey

public java.lang.Object getKey()
For a discrete trait, we simply return this.

Returns:
the object for this Trait which should be able to distinguish it from other traits. For a variable trait, return the result of Trait.getValue(). For other traits, return this.
See Also:
Trait.getKey()


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