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