Class SubCollectionConstraint<T>
java.lang.Object
org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint<T>
- Type Parameters:
- T- object type
- All Implemented Interfaces:
- Constraint<Collection<T>>
- Direct Known Subclasses:
- ClassCollectionConstraint
Constraint that checks whether a collection (the parameter value) is a subset of a constraint collection.
 
 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
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaccept(Collection<T> value) Checks whether the value complies with constraints.Returns a message for value failure, pointing to a parameter using '%s'.static <T> SubCollectionConstraint<T>newInstance(T... objs) Creates a new instance with given collection.toString()
- 
Field Details- 
objectsAcceptable objects.
 
- 
- 
Constructor Details- 
SubCollectionConstraint- Parameters:
- objects- acceptable objects
 
 
- 
- 
Method Details- 
acceptDescription copied from interface:ConstraintChecks whether the value complies with constraints.- Specified by:
- acceptin interface- Constraint<T>
- Parameters:
- value- Value to check.
- Returns:
- Whether the value complies with constraints.
 
- 
failMessageDescription copied from interface:ConstraintReturns a message for value failure, pointing to a parameter using '%s'.- Specified by:
- failMessagein interface- Constraint<T>
- Returns:
- Message for value failure, pointing to a parameter using '%s'.
 
- 
newInstanceCreates a new instance with given collection.- Type Parameters:
- T- type
- Parameters:
- objs- acceptable objects
- Returns:
- new instance with given collection
 
- 
toString
 
-