@Test(expected = IllegalArgumentException.class) public void merge_empty_list() { merge(); }
public static TextRange merge(List<TextRange> ranges) { return new TextRangeImpl( ranges.stream().map(TextRange::start).min(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER), ranges.stream().map(TextRange::end).max(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER) ); }
TextRanges { public static TextRange merge(List<TextRange> ranges) { return new TextRangeImpl( ranges.stream().map(TextRange::start).min(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER), ranges.stream().map(TextRange::end).max(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER) ); } }
TextRanges { public static TextRange merge(List<TextRange> ranges) { return new TextRangeImpl( ranges.stream().map(TextRange::start).min(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER), ranges.stream().map(TextRange::end).max(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER) ); } private  TextRanges(); }
TextRanges { public static TextRange merge(List<TextRange> ranges) { return new TextRangeImpl( ranges.stream().map(TextRange::start).min(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER), ranges.stream().map(TextRange::end).max(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER) ); } private  TextRanges(); static TextRange range(int startLine, int startLineOffset, int endLine, int endLineOffset); static TextRange merge(List<TextRange> ranges); }
TextRanges { public static TextRange merge(List<TextRange> ranges) { return new TextRangeImpl( ranges.stream().map(TextRange::start).min(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER), ranges.stream().map(TextRange::end).max(naturalOrder()).orElseThrow(MERGE_EXCEPTION_SUPPLIER) ); } private  TextRanges(); static TextRange range(int startLine, int startLineOffset, int endLine, int endLineOffset); static TextRange merge(List<TextRange> ranges);  }