T
- the generic type of the objects returned by the filter.public class TypeFilter<T> extends Object implements CollectionFilter<T>
Modifier and Type | Method and Description |
---|---|
static <T> TypeFilter<T> |
byType(Class<T> type)
Creates a new
. |
List<T> |
filter(Collection<?> target)
Filters the given collection by the type specified in this filter.
|
public static <T> TypeFilter<T> byType(Class<T> type)
TypeFilter
.T
- the generic type of the target type.type
- the target type for this filter.public List<T> filter(Collection<?> target)
filter
in interface CollectionFilter<T>
target
- the collection to filter.IllegalArgumentException
- if the given collection is null
.Copyright © 2014-2015 AssertJ. All Rights Reserved.