Class BulletList
java.lang.Object
org.tealeaf.javamarkdown.MarkdownElement
org.tealeaf.javamarkdown.types.Structure
org.tealeaf.javamarkdown.types.ListStructure
org.tealeaf.javamarkdown.elements.BulletList
Implements a bulleted list
The typical format of a bulleted list is:
- Content - Content - Content
The typical format of a bulleted list with a name is:
Name - Content - Content
- Since:
- 0.0.11
- Author:
- Thomas Kwashnak
-
Field Summary
Fields inherited from class org.tealeaf.javamarkdown.types.ListStructure
items, name
-
Constructor Summary
ConstructorDescriptionCreates an empty bullet list with no nameBulletList
(Object[] objects) Creates a bullet list with an initial set of items and no nameBulletList
(String name) Creates an empty list with a nameBulletList
(String name, Object[] objects) Creates a list with initial contents and a set nameBulletList
(String name, List<?> objects) Creates a list with a set name and initial contents from a listBulletList
(String name, Stream<?> stream) Creates a list with a name and initial contents from a streamBulletList
(List<?> objects) Creates a list with initial contents from a listBulletList
(Stream<?> stream) Creates a list with initial contents from a stream -
Method Summary
Methods inherited from class org.tealeaf.javamarkdown.types.ListStructure
add, add, asString, checkType, getItems, getName, printItem, requiresNewlineAfter, requiresNewlineBefore
Methods inherited from class org.tealeaf.javamarkdown.MarkdownElement
asString, toAppendable, toString, toWriter
-
Constructor Details
-
BulletList
public BulletList()Creates an empty bullet list with no name- Since:
- 0.0.12
-
BulletList
Creates a bullet list with an initial set of items and no name- Parameters:
objects
- The initial objects to add, in order- Since:
- 0.0.12
-
BulletList
Creates an empty list with a name- Parameters:
name
- The string to print immediately before the list- Since:
- 0.0.12
-
BulletList
Creates a list with initial contents and a set name- Parameters:
name
- The string to print immediately before the listobjects
- The initial objects to add, in order- Since:
- 0.0.12
-
BulletList
Creates a list with initial contents from a stream- Parameters:
stream
- Stream of objects to insert into the list- Since:
- 0.0.15
-
BulletList
Creates a list with a name and initial contents from a stream- Parameters:
name
- The string to print immediately before the liststream
- Stream of objects to insert into the list- Since:
- 0.0.15
-
BulletList
Creates a list with initial contents from a list- Parameters:
objects
- List of objects to include in the list- Since:
- 0.0.15
-
BulletList
Creates a list with a set name and initial contents from a list- Parameters:
name
- String to print immediately before the listobjects
- List of objects to include in the list- Since:
- 0.0.15
-
-
Method Details
-
getPrefix
Generates the prefix to insert before a given item in the list.
- Specified by:
getPrefix
in classListStructure
- Parameters:
index
- Index of the item- Returns:
"- "
- Since:
- 0.0.11
-