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-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the value complies with constraints.Returns a message for value failure, pointing to a parameter using '%s'.
-
Method Details
-
accept
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'.
-