com.rubecula.darwin.domain.environment
Class Trait_Variable

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_Variable
All Implemented Interfaces:
Censusible, Expression, Quantifiable, Trait, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString

public final class Trait_Variable
extends Trait_
implements Quantifiable

Concrete implementation of Trait which is based on a variable value. TODO we should not have our own _value field here. We should be using the superclass value field.

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
 
Constructor Summary
Trait_Variable(Pharacter character, double value)
           
 
Method Summary
 double doubleValue()
           
 java.lang.String getIdentifier()
           
 java.lang.Object getKey()
           
 java.lang.Object getValue()
          TODO consider eliminating this method.
 
Methods inherited from class com.rubecula.darwin.domain.environment.Trait_
censusMe, equals, getCensusibleChildren, getCharacter, getCharacterKey, getPhenotype, 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
 

Constructor Detail

Trait_Variable

public Trait_Variable(Pharacter character,
                      double value)
Parameters:
character -
value - a double
Method Detail

doubleValue

public double doubleValue()
Specified by:
doubleValue in interface Quantifiable
Returns:
this object expressed as a double.
See Also:
Quantifiable.doubleValue()

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in interface net.sf.tostring0.Identifiable
Overrides:
getIdentifier in class Trait_
Returns:
Trait_.getCharacterKey() ':' Trait_.getVariantKey()
See Also:
Trait_.getIdentifier()

getKey

public java.lang.Object getKey()
Specified by:
getKey in interface Trait
Returns:
the value of this trait - sufficient to distinguis trait from others.
See Also:
Trait_.getValue()

getValue

public java.lang.Object getValue()
Description copied from interface: Trait
TODO consider eliminating this method.

Specified by:
getValue in interface Trait
Overrides:
getValue in class Trait_
Returns:
the value of the underlying variant.
See Also:
Trait_.getValue()


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