Enum Saenger

  • All Implemented Interfaces:
    Serializable, Comparable<Saenger>

    public enum Saenger
    extends Enum<Saenger>
    A classification of RNA base pairs described in Principles of Nucleic Acid Structure. W. Saenger.
    • Method Detail

      • values

        public static Saenger[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Saenger c : Saenger.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Saenger valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromString

        public static Saenger fromString​(String str)
        Finds an enum that matches the given name or return UNKNOWN otherwise.
        Parameters:
        str - A string representing Saenger notation.
        Returns:
        An instance of this enum that matches the given name or UNKNOWN if none does.
      • fromNumber

        public static Saenger fromNumber​(int number)
        Matches a value in range 1-28 to an instance of this class with the same value written as a Roman numeral. The number is used in mmCIF files in hbond_28 field.
        Parameters:
        number - An integer in range [1; 28].
        Returns:
        An instance of this class that matches ordinal or UNKNOWN if none does.
      • assumeCanonical

        public static Saenger assumeCanonical​(BasePair basePair)
        Checks which one of Saenger instances matches a canonical base pair of provided sequence. C-G canonical base pairs are XIX, A-U are XX and G-U are XXVIII. If base pair sequence is other than C-G, A-U or G-U, then this method returns UNKNOWN.
        Parameters:
        basePair - A base pair to be checked.
        Returns:
        XIX for C-G base pair, XX for A-U base pair, XXVIII for G-U base pair and UNKNOWN for all others.
      • isCanonical

        public static boolean isCanonical​(Saenger saenger)
        Checks if instance of Saenger represents a canonical base pair (XIX, XX and XXVIII).
        Parameters:
        saenger - An instance to be checked.
        Returns:
        True if saenger is either XIX, XX or XXVIII.
      • isCanonical

        public boolean isCanonical()
        Returns:
        True if this instance is either XIX, XX or XXVIII.