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