1 /* 2 * This file is part of AceLogger. 3 * 4 * AceLogger is free software: you can redistribute it and/or modify it under the terms of the GNU 5 * Lesser General Public License as published by the Free Software Foundation, either version 3 of 6 * the License, or (at your option) any later version. 7 * 8 * AceLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 * Lesser General Public License for more details. 11 * 12 * You should have received a copy of the GNU Lesser General Public License along with AceLogger. 13 * If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. 14 */ 15 package net.sourceforge.acelogger.level.filter; 16 17 import net.sourceforge.acelogger.level.LogLevel; 18 19 /** 20 * A filter that accepts no levels. 21 * 22 * @author Zardi (https://sourceforge.net/users/daniel_zardi) 23 * @version 1.0.0 24 * @since 1.0.0 25 */ 26 public class AcceptNoneLevelFilter implements LevelFilter { 27 28 /** 29 * The identifier of this filter. 30 */ 31 private String identifier; 32 33 /** 34 * Constructs a new link AcceptNoneLevelFilter with the supplied identifier. 35 * 36 * @param identifier 37 * The identifier for this filter. 38 * @since 1.0.0 39 */ 40 public AcceptNoneLevelFilter(String identifier) { 41 setIdentifier(identifier); 42 } 43 44 /** {@inheritDoc} */ 45 public final String getIdentifier() { 46 return identifier; 47 } 48 49 /** 50 * Sets the string that identifies this object. 51 * 52 * @param identifier 53 * The identifier of this object. 54 * @since 1.0.0 55 */ 56 private void setIdentifier(String identifier) { 57 this.identifier = identifier; 58 } 59 60 /** {@inheritDoc} */ 61 public boolean isSuitable(LogLevel level) { 62 return false; 63 } 64 65 }