Class TText

java.lang.Object
com.j3d.gen.docs.reader.tokens.TText
Direct Known Subclasses:
TLink

public class TText extends Object
A class representing a piece of text with potential formatting (bold, italic, inline code).
Author:
Lehlogonolo Poole
See Also:
  • Field Details

    • content

      private String content
    • bold

      private boolean bold
    • italic

      private boolean italic
    • inlineCode

      private boolean inlineCode
  • Constructor Details

    • TText

      public TText(String content)
      Constructs a new TText object with the given content.
      Parameters:
      content - The text content.
  • Method Details

    • setBold

      public TText setBold(boolean bold)
      Sets whether the text should be bold.
      Parameters:
      bold - True if the text should be bold, false otherwise.
      Returns:
      This TText instance for method chaining.
    • isBold

      public boolean isBold()
      Checks if the text is bold.
      Returns:
      True if the text is bold, false otherwise.
    • isItalic

      public boolean isItalic()
      Checks if the text is italic.
      Returns:
      True if the text is italic, false otherwise.
    • isInlineCode

      public boolean isInlineCode()
      Checks if the text is inline code.
      Returns:
      True if the text is inline code, false otherwise.
    • setInlineCode

      public TText setInlineCode(boolean inlineCode)
      Sets whether the text should be inline code.
      Parameters:
      inlineCode - True if the text should be inline code, false otherwise.
      Returns:
      This TText instance for method chaining.
    • setItalic

      public TText setItalic(boolean italic)
      Sets whether the text should be italic.
      Parameters:
      italic - True if the text should be italic, false otherwise.
      Returns:
      This TText instance for method chaining.
    • getContent

      public String getContent()
      Gets the content of the text.
      Returns:
      The text content.