package org.opentrafficsim.base.parameters.constraint;
/**
* Interface for a parameter constraint.
*
* Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License.
*
* @version $Revision$, $LastChangedDate$, by $Author$, initial version 30 jun. 2017
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Wouter Schakel
* @param value type
*/
public interface Constraint
{
/**
* Checks whether the value complies with constraints.
* @param value T; Value to check.
* @return Whether the value complies with constraints.
*/
boolean accept(T value);
/**
* Returns a message for value failure, pointing to a parameter using '%s'.
* @return Message for value failure, pointing to a parameter using '%s'.
*/
String failMessage();
}