public final class ClassFilter extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
isIncluded(T candidate,
Class<? extends T>[] included,
Class<? extends T>[] excluded,
boolean includeBothEmpty)
Determines if a candidate object's type passes a set of included/excluded filters
|
static <T> boolean |
matches(T candidate,
Class<? extends T>[] classes)
Determines if a candidate object's type matches an element in the classes array.
|
public static <T> boolean isIncluded(T candidate,
Class<? extends T>[] included,
Class<? extends T>[] excluded,
boolean includeBothEmpty)
Returns true of one of the following conditions is true
candidate - The object to check if it is included or excludedincluded - Array of included classes, may be nullexcluded - Array of excluded classes, may be nullincludeBothEmpty - If true then if both the included and excluded arrays are null true will be returned.public static <T> boolean matches(T candidate,
Class<? extends T>[] classes)
candidate - The object to check if its type matches one of the classes in the array, must not be null.classes - List of classes to check against, may be null.Copyright © 2019. All rights reserved.