ClassCollectionConstraint.java

package org.opentrafficsim.base.parameters.constraint;

import java.util.Collection;

/**
 * Constraint that checks whether a collection of classes is a sub collection of constraint collection.
 * <p>
 * Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
 * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
 * </p>
 * @author Alexander Verbraeck
 * @author Peter Knoppers
 * @author Wouter Schakel
 * @param <T> class
 */
public final class ClassCollectionConstraint<T> extends SubCollectionConstraint<Class<? extends T>>
{

    /**
     * Constructor.
     * @param classes acceptable classes
     */
    public ClassCollectionConstraint(final Collection<Class<? extends T>> classes)
    {
        super(classes);
    }

    @Override
    public String toString()
    {
        return "ClassCollectionConstraint [classes=" + this.objects + "]";
    }

}