1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.joran.spi;
15
16
17
18
19
20
21
22
23
24
25
26 public class HostClassAndPropertyDouble {
27
28 final Class hostClass;
29 final String propertyName;
30
31 public HostClassAndPropertyDouble(Class hostClass, String propertyName) {
32 this.hostClass = hostClass;
33 this.propertyName = propertyName;
34 }
35
36 public Class getHostClass() {
37 return hostClass;
38 }
39
40 public String getPropertyName() {
41 return propertyName;
42 }
43
44 @Override
45 public int hashCode() {
46 final int prime = 31;
47 int result = 1;
48 result = prime * result + ((hostClass == null) ? 0 : hostClass.hashCode());
49 result = prime * result
50 + ((propertyName == null) ? 0 : propertyName.hashCode());
51 return result;
52 }
53
54 @Override
55 public boolean equals(Object obj) {
56 if (this == obj)
57 return true;
58 if (obj == null)
59 return false;
60 if (getClass() != obj.getClass())
61 return false;
62 final HostClassAndPropertyDouble other = (HostClassAndPropertyDouble) obj;
63 if (hostClass == null) {
64 if (other.hostClass != null)
65 return false;
66 } else if (!hostClass.equals(other.hostClass))
67 return false;
68 if (propertyName == null) {
69 if (other.propertyName != null)
70 return false;
71 } else if (!propertyName.equals(other.propertyName))
72 return false;
73 return true;
74 }
75
76 }