Enum Class MarkDownLiteral.Title

java.lang.Object
java.lang.Enum<MarkDownLiteral.Title>
com.yetnt.utils.builders.MarkDownLiteral.Title
All Implemented Interfaces:
Serializable, Comparable<MarkDownLiteral.Title>, Constable
Enclosing class:
MarkDownLiteral

public static enum MarkDownLiteral.Title extends Enum<MarkDownLiteral.Title>
Enum representing different levels of Markdown headings (titles).
  • Enum Constant Details

  • Field Details

    • number

      private final int number
  • Constructor Details

    • Title

      private Title(int n)
  • Method Details

    • values

      public static MarkDownLiteral.Title[] 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 MarkDownLiteral.Title 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
    • getNumber

      public int getNumber()
    • fromNumber

      public static MarkDownLiteral.Title fromNumber(int n)
      Returns the MarkDownLiteral.Title enum corresponding to a given heading number.
      Parameters:
      n - The heading number (1-6).
      Returns:
      The MarkDownLiteral.Title enum. Defaults to NOTE if the number is out of range.
    • toMd

      public String toMd()
      Converts the MarkDownLiteral.Title enum to its Markdown string representation (e.g., "## ").
      Returns:
      The Markdown string for the heading.