Package com.j3d.gen.docs.reader.tokens
Class TText
java.lang.Object
com.j3d.gen.docs.reader.tokens.TText
- Direct Known Subclasses:
TLink
A class representing a piece of text with potential formatting (bold, italic, inline code).
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the content of the text.booleanisBold()Checks if the text is bold.booleanChecks if the text is inline code.booleanisItalic()Checks if the text is italic.setBold(boolean bold) Sets whether the text should be bold.setInlineCode(boolean inlineCode) Sets whether the text should be inline code.setItalic(boolean italic) Sets whether the text should be italic.
-
Field Details
-
-
bold
private boolean bold -
italic
private boolean italic -
inlineCode
private boolean inlineCode
-
-
Constructor Details
-
TText
Constructs a new TText object with the given content.- Parameters:
content- The text content.
-
-
Method Details
-
setBold
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
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
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
Gets the content of the text.- Returns:
- The text content.
-