|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tostring0.AToString com.rubecula.darwin.domain.environment.Pharacter_
public abstract class Pharacter_
Base implementation of Pharacter
(a Phenotypic Character). This class
is the environmental analog to Locus_
.
Field Summary |
---|
Fields inherited from interface com.rubecula.darwin.domain.helper.Pharacter |
---|
SEX |
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 | |
---|---|
protected |
Pharacter_(java.lang.String identifier,
boolean sexLinked)
Protected abstract constructor. |
Method Summary | |
---|---|
java.lang.String |
addVariant(Variant variant)
Add the variant to this Pharacter, set its character to be this; then return its key. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getIdentifier()
Get the identifier for this phenotypic character, for example "Eye Color". |
java.lang.String |
getKey(Variant variant)
if _variants contains an element whose key is the variant's id,
then return the key else null. |
Variant |
getVariant(java.lang.String key)
Method to get the specific variant referred to by the key. |
java.util.Set<java.lang.String> |
getVariantKeys()
|
java.util.Collection<Variant> |
getVariants()
|
int |
hashCode()
|
boolean |
isSexLinked()
|
void |
setVariants(java.util.Collection<? extends Variant> variants)
Clear the list of variants and add in all those from the given list. |
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 |
Constructor Detail |
---|
protected Pharacter_(java.lang.String identifier, boolean sexLinked)
identifier
- the identifier for this charactersexLinked
- XXXMethod Detail |
---|
public java.lang.String addVariant(Variant variant)
addVariant
in interface Pharacter
variant
- A value which this character can take.
com.rubecula.darwin.domain.helper.Pharacter#addVariant(com.rubecula
.darwin.domain.helper.Variant)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getIdentifier()
getIdentifier
in interface net.sf.tostring0.Identifiable
Identifiable.getIdentifier()
public java.lang.String getKey(Variant variant)
_variants
contains an element whose key is the variant's id,
then return the key else null.
getKey
in interface Pharacter
Pharacter.getKey(com.rubecula.darwin.domain.helper.Variant)
public Variant getVariant(java.lang.String key)
getVariant
in interface Pharacter
key
- a string which identifies the variant from among those which
are legal for this character. If the key is null, then we
return null as the result. This is the case when a trait is
variable and there is no registered variants.
Pharacter.getVariant(java.lang.String)
public java.util.Set<java.lang.String> getVariantKeys()
getVariantKeys
in interface Pharacter
Pharacter.getVariantKeys()
public java.util.Collection<Variant> getVariants()
getVariants
in interface Pharacter
Pharacter.getVariants()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isSexLinked()
isSexLinked
in interface SexLinked
SexLinked.isSexLinked()
public void setVariants(java.util.Collection<? extends Variant> variants)
variants
- a collection of variants which will make up the variants for
this phenotypic character.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |