Class AllowDenyCollectionManager<T>
- java.lang.Object
-
- org.springframework.kafka.support.AllowDenyCollectionManager<T>
-
- Type Parameters:
T
- Collection generic type
public final class AllowDenyCollectionManager<T> extends java.lang.Object
Class for managing Allow / Deny collections and its predicates.- Since:
- 28/12/20
- Author:
- Tomaz Fernandes
-
-
Constructor Summary
Constructors Constructor Description AllowDenyCollectionManager(java.util.Collection<T> allowList, java.util.Collection<T> denyList)
AllowDenyCollectionManager(java.util.Collection<T> allowList, java.util.Collection<T> denyList, java.util.Collection<java.util.function.Predicate<T>> predicates)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areAllowed(T[] objects)
static <T> AllowDenyCollectionManager<T>
createManagerFor(java.util.Collection<T> allowList, java.util.Collection<T> denyList)
static <T> AllowDenyCollectionManager<T>
createManagerFor(java.util.Collection<T> allowList, java.util.Collection<T> denyList, java.util.Collection<java.util.function.Predicate<T>> predicates)
java.util.function.Predicate<T>
getDefaultPredicate(java.util.Collection<T> allowList, java.util.Collection<T> denyList)
boolean
hasNoRestrictions()
boolean
isAllowed(T objectToCheck)
-
-
-
Method Detail
-
getDefaultPredicate
public java.util.function.Predicate<T> getDefaultPredicate(java.util.Collection<T> allowList, java.util.Collection<T> denyList)
-
isAllowed
public boolean isAllowed(T objectToCheck)
-
areAllowed
public boolean areAllowed(T[] objects)
-
createManagerFor
public static <T> AllowDenyCollectionManager<T> createManagerFor(java.util.Collection<T> allowList, java.util.Collection<T> denyList)
-
createManagerFor
public static <T> AllowDenyCollectionManager<T> createManagerFor(java.util.Collection<T> allowList, java.util.Collection<T> denyList, java.util.Collection<java.util.function.Predicate<T>> predicates)
-
hasNoRestrictions
public boolean hasNoRestrictions()
-
-