code: public List<StyledSegment<SEG, S>> getStyledSegments() {
          if (styledSegments == null) {
              if (segments.size() == 1 && styles.getSpanCount() == 1) {
                  styledSegments = Collections.singletonList(
                          new StyledSegment<>(segments.get(0), styles.getStyleSpan(0).getStyle())
                  );
              } else {
                  styledSegments = createStyledSegments();
              }
          }
          return styledSegments;
      }
docs: Since the segments and styles in a paragraph are stored separate from another, combines these two collections
  into a single collection where each segment and its corresponding style are grouped into the same object.
  Essentially, returns {@code List<Tuple2<Segment, Style>>}.