Package org.biojava.bio
Class EcNumber.Impl
- java.lang.Object
- 
- org.biojava.bio.EcNumber.Impl
 
- 
- All Implemented Interfaces:
- EcNumber
 - Enclosing interface:
- EcNumber
 
 public static class EcNumber.Impl extends Object implements EcNumber A simple implementation of EcNumber.- Since:
- 1.4
- Author:
- Matthew Pocock
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.biojava.bio.EcNumberEcNumber.Impl
 
- 
 - 
Field Summary- 
Fields inherited from interface org.biojava.bio.EcNumberEC_PATTERN, UNCLASSIFIED, UNDEFINED
 
- 
 - 
Constructor SummaryConstructors Constructor Description Impl(int mainClass, int subClass, int subSubClass, int group)Make a new EcNumber.Impl with the data provided.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetClassNumber(int level)Get the class number associated with the particular level of the ec number.inthashCode()StringtoString()static EcNumber.ImplvalueOf(String ecString)Process a string into an EcNumber.
 
- 
- 
- 
Constructor Detail- 
Implpublic Impl(int mainClass, int subClass, int subSubClass, int group) Make a new EcNumber.Impl with the data provided.- Parameters:
- mainClass- the main class number
- subClass- the sub class number
- subSubClass- the sub-sub class number
- group- the group number
 
 
- 
 - 
Method Detail- 
getClassNumberpublic int getClassNumber(int level) Description copied from interface:EcNumberGet the class number associated with the particular level of the ec number.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. - Specified by:
- getClassNumberin interface- EcNumber
- Parameters:
- level- the level in the ec classification to return the number for
- Returns:
- the value at that level
 
 - 
valueOfpublic static EcNumber.Impl valueOf(String ecString) Process a string into an EcNumber.This method uses the EcNumber.EC_PATTERNregular expression.- Parameters:
- ecString- String to parse
- Returns:
- a new EcNumber
- Throws:
- IllegalArgumentException- if ecString could not be parsed
 
 
- 
 
-