public class SimpleNCBITaxonName extends Object implements Comparable
Modifier | Constructor and Description |
---|---|
protected |
SimpleNCBITaxonName() |
|
SimpleNCBITaxonName(String nameClass,
String name)
Creates a new taxon name based on the given class and name, both of
which cannot be null.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Taxon names are sorted by class first, then name.
|
boolean |
equals(Object o)
Two taxon names are equal if their name and class match.
|
String |
getName()
Returns this name.
|
String |
getNameClass()
Returns the class of this name.
|
int |
hashCode() |
void |
setName(String name)
Changes the name.
|
void |
setNameClass(String nameClass)
Changes the class of this name.
|
String |
toString()
Form: "class:name"
|
protected SimpleNCBITaxonName()
public SimpleNCBITaxonName(String nameClass, String name)
nameClass
- the class of the new name. Use one of the constants from
NCBITaxon
(for example NCBITaxon.SCIENTIFIC
).name
- the name itselfpublic void setNameClass(String nameClass)
nameClass
- the new class for this name.public String getNameClass()
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2014 BioJava. All rights reserved.