Package jebl.evolution.taxa
Class Taxon
java.lang.Object
jebl.evolution.taxa.Taxon
- All Implemented Interfaces:
Comparable,Attributable
- Version:
- $Id: Taxon.java 1008 2009-07-19 23:08:37Z matt_kearse $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Nested Class Summary
Nested classes/interfaces inherited from interface jebl.util.Attributable
Attributable.Utils -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetAttribute(String name) Gets the entire attribute map.getName()get the name of the taxonstatic TaxonA static method that returns a Taxon object with the given name.get the taxonomic level of the taxoninthashCode()voidremoveAttribute(String name) voidsetAttribute(String name, Object value) Sets an named attribute for this object.toString()
-
Method Details
-
getName
get the name of the taxon- Returns:
- the name
-
getTaxonomicLevel
get the taxonomic level of the taxon- Returns:
- the taxonomic level
-
setAttribute
Description copied from interface:AttributableSets an named attribute for this object.- Specified by:
setAttributein interfaceAttributable- Parameters:
name- the name of the attribute.value- the new value of the attribute.
-
getAttribute
- Specified by:
getAttributein interfaceAttributable- Parameters:
name- the name of the attribute of interest, or null if the attribute doesn't exist.- Returns:
- an object representing the named attributed for this object.
-
removeAttribute
- Specified by:
removeAttributein interfaceAttributable- Parameters:
name- name of attribute to remove
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceAttributable- Returns:
- an array of the attributeNames that this object has.
-
getAttributeMap
Description copied from interface:AttributableGets the entire attribute map.- Specified by:
getAttributeMapin interfaceAttributable- Returns:
- an unmodifiable map
-
getAllTaxa
- Returns:
- a Set containing all the currently created Taxon objects.
-
getTaxon
A static method that returns a Taxon object with the given name. If this has already been created then the same instance will be returned.- Parameters:
name-- Returns:
- the taxon
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable
-
equals
-
hashCode
public int hashCode()
-