In tandem with #644, we should be able to easily construct a list of Paragraphs that can be passed into a ROSD. Something like...
ParagraphListBuilder<PS, SEG, S> builder = new ParagraphListBuilder<>(segmentOps, defaultParagraphStyle);
List<Paragraph<PS, SEG, S> list = builder
// each add paragraph method is a wrapper around the `Paragraph` constructor
// but ignores the segmentOps part since this should be the same object
// for the entire StyledDocument
.addParagraph(SEG seg, S style)
// to avoid passing in a paragraph style each time, we can ignore it
// and use the default paragraph style
.addParagraph(List<SEG> segs, StyleSpans<S> spans)
// in cases where it's desired, it can still be added
.addParagraph(overridingParagraphStyle, List<StyledSegmetn<SEG, S>> list)
// when finished, we can create it
// only one builder can be used per list
.build();
In tandem with #644, we should be able to easily construct a list of
Paragraphs that can be passed into a ROSD. Something like...