1 package net.sf.jlayercheck.util.model;
2
3 import java.util.Set;
4 import java.util.TreeSet;
5
6
7
8
9
10
11 public class ClassDependency {
12 protected String dependency;
13 protected Set<Integer> lineNumbers = new TreeSet<Integer>();
14 protected boolean unallowedDependency;
15
16 public ClassDependency(String dependency) {
17 this.dependency = dependency;
18 }
19
20 @Override
21 public boolean equals(Object obj) {
22 return dependency.equals(obj);
23 }
24
25 @Override
26 public int hashCode() {
27 return dependency.hashCode();
28 }
29
30 public void addLineNumber(int lineNumber) {
31 lineNumbers.add(lineNumber);
32 }
33
34
35
36
37
38
39
40 public Set<Integer> getLineNumbers() {
41 return lineNumbers;
42 }
43
44
45
46
47
48
49 public String getDependency() {
50 return dependency;
51 }
52
53
54
55
56
57 public boolean isUnallowedDependency() {
58 return unallowedDependency;
59 }
60
61 public void setUnallowedDependency(boolean unallowedDependency) {
62 this.unallowedDependency = unallowedDependency;
63 }
64 }