1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.qedeq.kernel.se.dto.module;
17
18 import org.qedeq.base.utility.EqualsUtility;
19 import org.qedeq.kernel.se.base.module.LocationList;
20 import org.qedeq.kernel.se.base.module.Specification;
21
22
23
24
25
26
27
28
29
30
31 public class SpecificationVo implements Specification {
32
33
34 private String name;
35
36
37 private String ruleVersion;
38
39
40 private LocationList locationList;
41
42
43
44
45
46
47
48
49
50 public SpecificationVo(final String name, final String ruleVersion,
51 final LocationList locations) {
52 this.name = name;
53 this.ruleVersion = ruleVersion;
54 this.locationList = locations;
55 }
56
57
58
59
60 public SpecificationVo() {
61
62 }
63
64 public final void setName(final String name) {
65 this.name = name;
66 }
67
68 public final String getName() {
69 return name;
70 }
71
72 public final void setRuleVersion(final String ruleVersion) {
73 this.ruleVersion = ruleVersion;
74 }
75
76 public final String getRuleVersion() {
77 return ruleVersion;
78 }
79
80
81
82
83
84
85 public final void setLocationList(final LocationListVo locations) {
86 this.locationList = locations;
87 }
88
89 public final LocationList getLocationList() {
90 return locationList;
91 }
92
93 public boolean equals(final Object obj) {
94 if (!(obj instanceof SpecificationVo)) {
95 return false;
96 }
97 final SpecificationVo other = (SpecificationVo) obj;
98 return EqualsUtility.equals(getName(), other.getName())
99 && EqualsUtility.equals(getRuleVersion(), other.getRuleVersion())
100 && EqualsUtility.equals(getLocationList(), other.getLocationList());
101 }
102
103 public int hashCode() {
104 return (getName() != null ? getName().hashCode() : 0)
105 ^ (getRuleVersion() != null ? 1 ^ getRuleVersion().hashCode() : 0)
106 ^ (getLocationList() != null ? 1 ^ getLocationList().hashCode() : 0);
107 }
108
109 public String toString() {
110 return "Name: " + name + ", Rule Version: " + ruleVersion + "\n" + locationList;
111 }
112
113 }