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