Class Taxon

java.lang.Object
jebl.evolution.taxa.Taxon
All Implemented Interfaces:
Comparable, Attributable

public final class Taxon extends Object implements Attributable, Comparable
Version:
$Id: Taxon.java 1008 2009-07-19 23:08:37Z matt_kearse $
Author:
Andrew Rambaut, Alexei Drummond
  • Method Details

    • getName

      public String getName()
      get the name of the taxon
      Returns:
      the name
    • getTaxonomicLevel

      public TaxonomicLevel getTaxonomicLevel()
      get the taxonomic level of the taxon
      Returns:
      the taxonomic level
    • setAttribute

      public void setAttribute(String name, Object value)
      Description copied from interface: Attributable
      Sets an named attribute for this object.
      Specified by:
      setAttribute in interface Attributable
      Parameters:
      name - the name of the attribute.
      value - the new value of the attribute.
    • getAttribute

      public Object getAttribute(String name)
      Specified by:
      getAttribute in interface Attributable
      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

      public void removeAttribute(String name)
      Specified by:
      removeAttribute in interface Attributable
      Parameters:
      name - name of attribute to remove
    • getAttributeNames

      public Set<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface Attributable
      Returns:
      an array of the attributeNames that this object has.
    • getAttributeMap

      public Map<String,Object> getAttributeMap()
      Description copied from interface: Attributable
      Gets the entire attribute map.
      Specified by:
      getAttributeMap in interface Attributable
      Returns:
      an unmodifiable map
    • getAllTaxa

      public static Set<Taxon> getAllTaxa()
      Returns:
      a Set containing all the currently created Taxon objects.
    • getTaxon

      public static Taxon getTaxon(String name)
      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

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable
    • equals

      public boolean equals(Taxon t)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object