1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  
15  package ch.qos.logback.core.model;
16  
17  import java.util.Objects;
18  
19  public class ParamModel extends NamedModel {
20  
21      private static final long serialVersionUID = -3697627721759508667L;
22      String value;
23  
24      @Override
25      protected ParamModel makeNewInstance() {
26          return new ParamModel();
27      }
28      
29      @Override
30      protected void mirror(Model that) {
31          ParamModel actual = (ParamModel) that;
32          super.mirror(actual);
33          this.value = actual.value;
34      }
35      
36      public String getValue() {
37          return value;
38      }
39  
40      public void setValue(String value) {
41          this.value = value;
42      }
43  
44      @Override
45      public int hashCode() {
46          final int prime = 31;
47          int result = super.hashCode();
48          result = prime * result + Objects.hash(value);
49          return result;
50      }
51  
52      @Override
53      public boolean equals(Object obj) {
54          if (this == obj)
55              return true;
56          if (!super.equals(obj))
57              return false;
58          if (getClass() != obj.getClass())
59              return false;
60          ParamModel other = (ParamModel) obj;
61          return Objects.equals(value, other.value);
62      }
63      
64  }