001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2015, 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 */ 014package ch.qos.logback.core.joran.conditional; 015 016/** 017 * <p>A condition evaluated during Joran conditional processing.</p> 018 * 019 * <p>Implementations of this interface encapsulate a boolean test that 020 * determines whether a conditional block in a Joran configuration should 021 * be processed.</p> 022 * 023 * <p>Typical implementations evaluate configuration state, environment 024 * variables, or other runtime properties.</p> 025 * 026 * @since 0.9.20 027 * @author Ceki Gülcü 028 */ 029public interface Condition { 030 031 /** 032 * Evaluate the condition. 033 * 034 * @return {@code true} if the condition is satisfied and the associated 035 * conditional block should be activated; {@code false} otherwise 036 */ 037 boolean evaluate(); 038}