Package com.teamten.markdown
Class Block.Builder
java.lang.Object
com.teamten.markdown.Block.Builder
- Enclosing class:
Block
Builds a Block one character at a time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a whole block to this block.Add any span to this block.addText
(char ch, FontVariantFlags flags) Add the character to the block.Add a plain string (no markup).addText
(String text, FontVariantFlags flags) Add a string.build()
Builds the block and returns it.boolean
isEmpty()
Returns whether any characters have been added so far.
-
Constructor Details
-
Builder
-
-
Method Details
-
getBlockType
-
addText
Add the character to the block.- Parameters:
ch
- the character to add.flags
- whether the character should be displayed in bold, italics, etc.
-
addText
Add a string. SeeaddText(char, FontVariantFlags)
for details. -
addText
Add a plain string (no markup). -
addSpan
Add any span to this block. -
addBlock
Add a whole block to this block. The block's type and counter are ignored. -
isEmpty
public boolean isEmpty()Returns whether any characters have been added so far. -
build
Builds the block and returns it. Do not call this more than once for a given builder.
-