1 package org.sonar.plugins.switchoffviolations.pattern;
3 import com.google.common.collect.Sets;
10 public class LineRange {
13 public LineRange(int from, int to) {
15 throw new IllegalArgumentException("Line range is not valid: " + from + " must be greater than " + to);
22 public boolean in(int lineId) {
23 return from <= lineId && lineId <= to;
27 public Set<Integer> toLines() {
28 Set<Integer> lines = Sets.newLinkedHashSet();
29 for (int index = from; index <= to; index++) {