Interface EcNumber

  • All Known Implementing Classes:
    EcNumber.Impl

    public interface EcNumber
    An ec (enzyme classification) number. Implementations of this interface should be imutable. This makes them much more usefull as keys in maps. it is a good idea to validate that the data being passed in is a sane ec number.
    Since:
    1.4
    Author:
    Matthew Pocock
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  EcNumber.Impl
      A simple implementation of EcNumber.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Pattern EC_PATTERN
      A Pattern that can be used to parse EC strings into the indiidual numbers.
      static int UNCLASSIFIED
      Constant that represents EC number components that are as yet unclassified.
      static int UNDEFINED
      Constant that represents EC number components that are not defined.
    • Field Detail

      • EC_PATTERN

        static final Pattern EC_PATTERN
        A Pattern that can be used to parse EC strings into the indiidual numbers.
      • UNDEFINED

        static final int UNDEFINED
        Constant that represents EC number components that are not defined. This is often represented as a '-' in EC strings.
        See Also:
        Constant Field Values
      • UNCLASSIFIED

        static final int UNCLASSIFIED
        Constant that represents EC number components that are as yet unclassified. This is often represented as 99 in EC strings.
        See Also:
        Constant Field Values
    • Method Detail

      • getClassNumber

        int getClassNumber​(int level)
        Get 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.

        Parameters:
        level - the level in the ec classification to return the number for
        Returns:
        the value at that level