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 + ((propertyName == null) ? 0 : propertyName.hashCode());
50 return result;
51 }
52
53 @Override
54 public boolean equals(Object obj) {
55 if (this == obj)
56 return true;
57 if (obj == null)
58 return false;
59 if (getClass() != obj.getClass())
60 return false;
61 final HostClassAndPropertyDouble other = (HostClassAndPropertyDouble) obj;
62 if (hostClass == null) {
63 if (other.hostClass != null)
64 return false;
65 } else if (!hostClass.equals(other.hostClass))
66 return false;
67 if (propertyName == null) {
68 if (other.propertyName != null)
69 return false;
70 } else if (!propertyName.equals(other.propertyName))
71 return false;
72 return true;
73 }
74
75 }