com.rubecula.darwin.domain.helper
Interface TraitMap

All Superinterfaces:
CacheSignature, Censusible, net.sf.tostring0.Identifiable
All Known Subinterfaces:
Phenotype
All Known Implementing Classes:
Phenotype_, Phenotype_Dawkinsian, Phenotype_TS, TraitMap_, TraitMap_ReadOnly

public interface TraitMap
extends CacheSignature, Censusible, net.sf.tostring0.Identifiable

Defines the operations on a read-only collection of Trait instances. XXX consider to rename this family of types as Phenotype... TODO consider combining this type with Expressions so that both can be named Phenotype.

Author:
Robin Hillyard

Method Summary
 java.util.Set<java.lang.String> getKeys()
           
 Trait getTrait(java.lang.String name)
          Accessor method to retrieve a trait from the map by name
 java.util.Collection<Trait> getTraits()
          TODO not required.
 int size()
          Method to get the number of traits in this map.
 
Methods inherited from interface com.rubecula.darwin.domain.helper.CacheSignature
getSignature
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible
censusMe, getCensusibleChildren
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

getKeys

java.util.Set<java.lang.String> getKeys()
Returns:
the set of traits.

getTrait

Trait getTrait(java.lang.String name)
Accessor method to retrieve a trait from the map by name

Parameters:
name -
Returns:
the Variant corresponding to name.

getTraits

java.util.Collection<Trait> getTraits()
TODO not required.

Returns:
the set of traits. Getter/setter typically called by reflection.

size

int size()
Method to get the number of traits in this map. TODO consider eliminating this -- use getTraits().size() instead.

Returns:
the number of traits in this map
See Also:
HashMap.size()


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