001/* 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2023, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014 015package ch.qos.logback.core.model; 016 017import java.util.Objects; 018 019public class SerializeModelModel extends Model { 020 021 private static final long serialVersionUID = 16385651235687L; 022 023 String file; 024 025 @Override 026 protected SerializeModelModel makeNewInstance() { 027 return new SerializeModelModel(); 028 } 029 030 public String getFile() { 031 return file; 032 } 033 034 public void setFile(String file) { 035 this.file = file; 036 } 037 038 @Override 039 public boolean equals(Object o) { 040 if (this == o) 041 return true; 042 if (o == null || getClass() != o.getClass()) 043 return false; 044 if (!super.equals(o)) 045 return false; 046 SerializeModelModel that = (SerializeModelModel) o; 047 return Objects.equals(file, that.file); 048 } 049 050 @Override 051 public int hashCode() { 052 return Objects.hash(super.hashCode(), file); 053 } 054}