001package ch.qos.logback.classic.model;
002
003import java.util.Objects;
004
005import ch.qos.logback.core.model.Model;
006
007public class LevelModel extends Model {
008
009    private static final long serialVersionUID = -7287549849308062148L;
010    String value;
011
012    @Override
013    protected LevelModel makeNewInstance() {
014        return new LevelModel();
015    }
016    
017    @Override
018    protected void mirror(Model that) {
019        LevelModel actual = (LevelModel) that;
020        super.mirror(actual);
021        this.value = actual.value;
022    }
023    
024    public String getValue() {
025        return value;
026    }
027
028    public void setValue(String value) {
029        this.value = value;
030    }
031
032    @Override
033    public int hashCode() {
034        final int prime = 31;
035        int result = super.hashCode();
036        result = prime * result + Objects.hash(value);
037        return result;
038    }
039
040    @Override
041    public boolean equals(Object obj) {
042        if (this == obj)
043            return true;
044        if (!super.equals(obj))
045            return false;
046        if (getClass() != obj.getClass())
047            return false;
048        LevelModel other = (LevelModel) obj;
049        return Objects.equals(value, other.value);
050    }
051
052}