Package pl.poznan.put.notation
Enum Saenger
- java.lang.Object
-
- java.lang.Enum<Saenger>
-
- pl.poznan.put.notation.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SaengerassumeCanonical(BasePair basePair)Checks which one ofSaengerinstances matches a canonical base pair of provided sequence.static SaengerfromNumber(int number)Matches a value in range 1-28 to an instance of this class with the same value written as a Roman numeral.static SaengerfromString(String str)Finds an enum that matches the given name or return UNKNOWN otherwise.booleanisCanonical()static booleanisCanonical(Saenger saenger)Checks if instance of Saenger represents a canonical base pair (XIX, XX and XXVIII).StringtoString()static SaengervalueOf(String name)Returns the enum constant of this type with the specified name.static Saenger[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
I
public static final Saenger I
-
II
public static final Saenger II
-
III
public static final Saenger III
-
IV
public static final Saenger IV
-
V
public static final Saenger V
-
VI
public static final Saenger VI
-
VII
public static final Saenger VII
-
VIII
public static final Saenger VIII
-
IX
public static final Saenger IX
-
X
public static final Saenger X
-
XI
public static final Saenger XI
-
XII
public static final Saenger XII
-
XIII
public static final Saenger XIII
-
XIV
public static final Saenger XIV
-
XV
public static final Saenger XV
-
XVI
public static final Saenger XVI
-
XVII
public static final Saenger XVII
-
XVIII
public static final Saenger XVIII
-
XIX
public static final Saenger XIX
-
XX
public static final Saenger XX
-
XXI
public static final Saenger XXI
-
XXII
public static final Saenger XXII
-
XXIII
public static final Saenger XXIII
-
XXIV
public static final Saenger XXIV
-
XXV
public static final Saenger XXV
-
XXVI
public static final Saenger XXVI
-
XXVII
public static final Saenger XXVII
-
XXVIII
public static final Saenger XXVIII
-
UNKNOWN
public static final Saenger UNKNOWN
-
-
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 nameNullPointerException- 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 inhbond_28field.- Parameters:
number- An integer in range [1; 28].- Returns:
- An instance of this class that matches
ordinalor UNKNOWN if none does.
-
assumeCanonical
public static Saenger assumeCanonical(BasePair basePair)
Checks which one ofSaengerinstances 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
saengeris either XIX, XX or XXVIII.
-
isCanonical
public boolean isCanonical()
- Returns:
- True if this instance is either XIX, XX or XXVIII.
-
-