Package org.biojava.bio
Class EcNumber.Impl
- java.lang.Object
-
- org.biojava.bio.EcNumber.Impl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.bio.EcNumber
EcNumber.Impl
-
-
Field Summary
-
Fields inherited from interface org.biojava.bio.EcNumber
EC_PATTERN, UNCLASSIFIED, UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description Impl(int mainClass, int subClass, int subSubClass, int group)Make a new EcNumber.Impl with the data provided.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetClassNumber(int level)Get the class number associated with the particular level of the ec number.inthashCode()java.lang.StringtoString()static EcNumber.ImplvalueOf(java.lang.String ecString)Process a string into an EcNumber.
-
-
-
Method Detail
-
getClassNumber
public 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 interfaceEcNumber- Parameters:
level- the level in the ec classification to return the number for- Returns:
- the value at that level
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
valueOf
public static EcNumber.Impl valueOf(java.lang.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:
java.lang.IllegalArgumentException- if ecString could not be parsed
-
-