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 TypeMethodDescriptionint
boolean
getAttribute
(String name) Gets the entire attribute map.getName()
get the name of the taxonstatic Taxon
A static method that returns a Taxon object with the given name.get the taxonomic level of the taxonint
hashCode()
void
removeAttribute
(String name) void
setAttribute
(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:Attributable
Sets an named attribute for this object.- Specified by:
setAttribute
in interfaceAttributable
- Parameters:
name
- the name of the attribute.value
- the new value of the attribute.
-
getAttribute
- Specified by:
getAttribute
in 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:
removeAttribute
in interfaceAttributable
- Parameters:
name
- name of attribute to remove
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceAttributable
- Returns:
- an array of the attributeNames that this object has.
-
getAttributeMap
Description copied from interface:Attributable
Gets the entire attribute map.- Specified by:
getAttributeMap
in 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:
compareTo
in interfaceComparable
-
equals
-
hashCode
public int hashCode()
-