List<HighlightTagPoint> (Collection<HighlightInfo> highlights) { List<HighlightTagPoint> highlightPoints = new ArrayList<>(); for (HighlightInfo highlight : highlights) { highlightPoints.add(new HighlightTagPoint(highlight.startOffset, true, highlight)); highlightPoints.add(new HighlightTagPoint(highlight.endOffset, false, highlight)); } return highlightPoints; }