Package com.yetnt.utils.builders
Enum Class MarkDownLiteral.Title
- All Implemented Interfaces:
Serializable,Comparable<MarkDownLiteral.Title>,Constable
- Enclosing class:
MarkDownLiteral
Enum representing different levels of Markdown headings (titles).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MarkDownLiteral.TitlefromNumber(int n) Returns theMarkDownLiteral.Titleenum corresponding to a given heading number.inttoMd()Converts theMarkDownLiteral.Titleenum to its Markdown string representation (e.g., "## ").static MarkDownLiteral.TitleReturns the enum constant of this class with the specified name.static MarkDownLiteral.Title[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TITLE
heading level 1.h1or#Example
-
SUBTITLE
heading level 2.h2or##Example
-
SECTION
heading level 3.h3or###Example
-
SUBSECTION
heading level 4.h4or####Example
-
DETAIL
heading level 5.h5or#####Example
-
NOTE
heading level 6.h6or######Example
-
-
Field Details
-
number
private final int number
-
-
Constructor Details
-
Title
private Title(int n)
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getNumber
public int getNumber() -
fromNumber
Returns theMarkDownLiteral.Titleenum corresponding to a given heading number.- Parameters:
n- The heading number (1-6).- Returns:
- The
MarkDownLiteral.Titleenum. Defaults to NOTE if the number is out of range.
-
toMd
Converts theMarkDownLiteral.Titleenum to its Markdown string representation (e.g., "## ").- Returns:
- The Markdown string for the heading.
-