Interface Constraint<T>
-
- Type Parameters:
T- value type
- All Known Implementing Classes:
ClassCollectionConstraint,ClassConstraint,CollectionConstraint,DualBound,MultiConstraint,NumericConstraint,SingleBound,SubCollectionConstraint
public interface Constraint<T>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, Peter Knoppers, Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(T value)Checks whether the value complies with constraints.StringfailMessage()Returns a message for value failure, pointing to a parameter using '%s'.
-
-
-
Method Detail
-
accept
boolean accept(T value)
Checks whether the value complies with constraints.- Parameters:
value- T; Value to check.- Returns:
- Whether the value complies with constraints.
-
failMessage
String failMessage()
Returns a message for value failure, pointing to a parameter using '%s'.- Returns:
- Message for value failure, pointing to a parameter using '%s'.
-
-