T - object typepublic class SubCollectionConstraint<T> extends Object implements Constraint<Collection<T>>
 Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
| Modifier and Type | Field and Description | 
|---|---|
protected Collection<T> | 
objects
Acceptable objects. 
 | 
| Constructor and Description | 
|---|
SubCollectionConstraint(Collection<T> objects)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
accept(Collection<T> value)
Checks whether the value complies with constraints. 
 | 
String | 
failMessage()
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. 
 | 
String | 
toString() | 
protected final Collection<T> objects
public SubCollectionConstraint(Collection<T> objects)
objects - acceptable objectspublic boolean accept(Collection<T> value)
accept in interface Constraint<Collection<T>>value - Value to check.public String failMessage()
failMessage in interface Constraint<Collection<T>>@SafeVarargs public static <T> SubCollectionConstraint<T> newInstance(T... objs)
T - typeobjs - acceptable objectsCopyright © 2014–2018 Delft University of Technology. All rights reserved.