1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package ch.qos.logback.core.model;
16
17 import java.util.Objects;
18
19 public class PropertyModel extends NamedModel {
20
21 private static final long serialVersionUID = 1494176979175092052L;
22
23 String value;
24 String scopeStr;
25
26 String file;
27 String resource;
28
29 @Override
30 protected PropertyModel makeNewInstance() {
31 return new PropertyModel();
32 }
33
34 @Override
35 protected void mirror(Model that) {
36 PropertyModel actual = (PropertyModel) that;
37 super.mirror(actual);
38 this.value = actual.value;
39 this.scopeStr = actual.scopeStr;
40 this.file = actual.file;
41 this.resource = actual.resource;
42
43 }
44
45 public String getValue() {
46 return value;
47 }
48
49 public void setValue(String value) {
50 this.value = value;
51 }
52
53 public String getScopeStr() {
54 return scopeStr;
55 }
56
57 public void setScopeStr(String scopeStr) {
58 this.scopeStr = scopeStr;
59 }
60
61 public String getFile() {
62 return file;
63 }
64
65 public void setFile(String file) {
66 this.file = file;
67 }
68
69 public String getResource() {
70 return resource;
71 }
72
73 public void setResource(String resource) {
74 this.resource = resource;
75 }
76
77 @Override
78 public int hashCode() {
79 final int prime = 31;
80 int result = super.hashCode();
81 result = prime * result + Objects.hash(file, resource, scopeStr, value);
82 return result;
83 }
84
85 @Override
86 public boolean equals(Object obj) {
87 if (this == obj)
88 return true;
89 if (!super.equals(obj))
90 return false;
91 if (getClass() != obj.getClass())
92 return false;
93 PropertyModel other = (PropertyModel) obj;
94 return Objects.equals(file, other.file) && Objects.equals(resource, other.resource)
95 && Objects.equals(scopeStr, other.scopeStr) && Objects.equals(value, other.value);
96 }
97
98
99 }