Enum Class CodonTable

java.lang.Object
java.lang.Enum<CodonTable>
org.episteme.natural.biology.genetics.CodonTable
All Implemented Interfaces:
Serializable, Comparable<CodonTable>, Constable

public enum CodonTable extends Enum<CodonTable>
The standard genetic code for translating RNA codons to Amino Acids.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Enum Constant Details

    • STANDARD

      public static final CodonTable STANDARD
  • Method Details

    • values

      public static CodonTable[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CodonTable valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • translate

      public AminoAcid translate(String codon)
      Translates a codon to an Amino Acid.
      Parameters:
      codon - 3-character RNA string (e.g., "AUG")
      Returns:
      AminoAcid or null for STOP
    • translateToChar

      public char translateToChar(String codon)
      Translates a codon to its single-letter representation.
    • isStop

      public boolean isStop(String codon)
      Checks if a codon is a stop codon.
    • isStart

      public boolean isStart(String codon)
      Checks if a codon is a start codon (AUG).