public static class EcNumber.Impl extends Object implements EcNumber
EcNumber.Impl
EC_PATTERN, UNCLASSIFIED, UNDEFINED
Constructor and Description |
---|
EcNumber.Impl(int mainClass,
int subClass,
int subSubClass,
int group)
Make a new EcNumber.Impl with the data provided.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getClassNumber(int level)
Get the class number associated with the particular level of the ec number.
|
int |
hashCode() |
String |
toString() |
static EcNumber.Impl |
valueOf(String ecString)
Process a string into an EcNumber.
|
public EcNumber.Impl(int mainClass, int subClass, int subSubClass, int group)
mainClass
- the main class numbersubClass
- the sub class numbersubSubClass
- the sub-sub class numbergroup
- the group numberpublic int getClassNumber(int level)
EcNumber
The index can be between 0 and 3 inclusive. 0 correxpons to the top level class, 1 to the sub-class and so on. A return value of UNDEFINED indicates that this field is not populated.
getClassNumber
in interface EcNumber
level
- the level in the ec classification to return the number forpublic static EcNumber.Impl valueOf(String ecString)
This method uses the EcNumber.EC_PATTERN
regular expression.
ecString
- String to parseIllegalArgumentException
- if ecString could not be parsedCopyright © 2014 BioJava. All rights reserved.