|
||||||||||
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.TraitMap_
public abstract class TraitMap_
Abstract class to define base methods and fields for a String-keyed map of
Variant objects.
TODO whereas in practice the keys are the character keys, and whereas we use
a phenotype cache which is based on TraitMap
, we should change the
initialization of the traits
field to be a TreeMap
, which
will thus give us the traits, ordered by character key.
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 | |
---|---|
protected |
TraitMap_()
|
Method Summary | |
---|---|
boolean |
censusMe(Census census,
java.lang.Object context)
Method to census this object. |
boolean |
equals(java.lang.Object o)
|
java.util.Collection<? extends Censusible> |
getCensusibleChildren()
Method to return a list of censusible children of this object. |
java.lang.String |
getIdentifier()
|
java.util.Set<java.lang.String> |
getKeys()
|
java.lang.String |
getSignature()
|
Trait |
getTrait(java.lang.String character)
XXX |
java.util.Collection<Trait> |
getTraits()
TEST |
int |
hashCode()
|
protected void |
put(java.lang.String key,
Trait value)
|
int |
size()
Method to get the number of traits in this map. |
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 TraitMap_()
Method Detail |
---|
public boolean censusMe(Census census, java.lang.Object context)
Censusible
censusMe
in interface Censusible
census
- the census object which will present the results of taking
this censuscontext
- an arbitrary object which can be used by the census object to
provide appropriate context for this object.
Censusible.getCensusibleChildren()
.Censusible.censusMe(com.rubecula.darwin.domain.helper.Census,
java.lang.Object)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.util.Collection<? extends Censusible> getCensusibleChildren()
Censusible
getCensusibleChildren
in interface Censusible
ArrayList
of censusible objects.Censusible.getCensusibleChildren()
public java.lang.String getIdentifier()
getIdentifier
in interface net.sf.tostring0.Identifiable
Identifiable.getIdentifier()
public java.util.Set<java.lang.String> getKeys()
getKeys
in interface TraitMap
public java.lang.String getSignature()
getSignature
in interface CacheSignature
CacheSignature.getSignature()
public Trait getTrait(java.lang.String character)
getTrait
in interface TraitMap
name
.TraitMap.getTrait(java.lang.String)
public java.util.Collection<Trait> getTraits()
getTraits
in interface TraitMap
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int size()
TraitMap
size
in interface TraitMap
TraitMap.size()
protected void put(java.lang.String key, Trait value) throws DarwinException
key
- the character key for this traitvalue
- the trait
DarwinException
- if the key is already present. This should never happen but
if your application really thinks this is OK, then you can
catch the exception. But you'll still only have one value for
the trait.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |