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