/** * Copies the elements of the parsed iterator(s) to a {@link SortedSet}. As * {@link Span} implements {@link Comparable} the Spans within the resulting * set will have the same order as returned by the methods of {@link AnalysedText} * @param it the iterator(s) * @return the {@link SortedSet} containing all Spans of the iterators */ public static <T extends Span> SortedSet<T> asSet(Iterator<T> it){ SortedSet<T> spans = new TreeSet<T>(); addToSet(it, spans); return spans; } /**
/** * Copies the elements of the parsed iterator(s) to a {@link SortedSet}. As * {@link Span} implements {@link Comparable} the Spans within the resulting * set will have the same order as returned by the methods of {@link AnalysedText} * @param it the iterator(s) * @return the {@link SortedSet} containing all Spans of the iterators */ public static <T extends Span> SortedSet<T> asSet(Iterator<T> it){ SortedSet<T> spans = new TreeSet<T>(); addToSet(it, spans); return spans; } /**