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