Package pl.poznan.put.notation
Enum Saenger
- All Implemented Interfaces:
Serializable
,Comparable<Saenger>
,java.lang.constant.Constable
A classification of RNA base pairs described in Principles of Nucleic Acid Structure. W. Saenger.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Saenger
assumeCanonical
(BasePair basePair) Checks which one ofSaenger
instances matches a canonical base pair of provided sequence.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.static Saenger
fromString
(String str) Finds an enum that matches the given name or return UNKNOWN otherwise.boolean
static boolean
isCanonical
(Saenger saenger) Checks if instance of Saenger represents a canonical base pair (XIX, XX and XXVIII).toString()
static Saenger
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 Details
-
I
-
II
-
III
-
IV
-
V
-
VI
-
VII
-
VIII
-
IX
-
X
-
XI
-
XII
-
XIII
-
XIV
-
XV
-
XVI
-
XVII
-
XVIII
-
XIX
-
XX
-
XXI
-
XXII
-
XXIII
-
XXIV
-
XXV
-
XXVI
-
XXVII
-
XXVIII
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
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
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_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
Checks which one ofSaenger
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
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.
-
toString
-
isCanonical
public boolean isCanonical()- Returns:
- True if this instance is either XIX, XX or XXVIII.
-