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);
21 public boolean in(int lineId) {
22 return from <= lineId && lineId <= to;
25 public Set<Integer> toLines() {
26 Set<Integer> lines = Sets.newLinkedHashSet();
27 for (int index = from; index <= to; index++) {