1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.model;
15
16 import java.util.Objects;
17
18 public class DefineModel extends NamedComponentModel {
19
20 private static final long serialVersionUID = 6209642548924431065L;
21 String scopeStr;
22
23 @Override
24 protected DefineModel makeNewInstance() {
25 return new DefineModel();
26 }
27
28 @Override
29 protected void mirror(Model that) {
30 DefineModel actual = (DefineModel) that;
31 super.mirror(actual);
32 this.scopeStr = actual.scopeStr;
33 }
34
35 public String getScopeStr() {
36 return scopeStr;
37 }
38
39 public void setScopeStr(String scopeStr) {
40 this.scopeStr = scopeStr;
41 }
42
43 @Override
44 public int hashCode() {
45 final int prime = 31;
46 int result = super.hashCode();
47 result = prime * result + Objects.hash(scopeStr);
48 return result;
49 }
50
51 @Override
52 public boolean equals(Object obj) {
53 if (this == obj)
54 return true;
55 if (!super.equals(obj))
56 return false;
57 if (getClass() != obj.getClass())
58 return false;
59 DefineModel other = (DefineModel) obj;
60 return Objects.equals(scopeStr, other.scopeStr);
61 }
62
63
64 }