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