Class DynamicDescendantFilter
- java.lang.Object
-
- org.junit.jupiter.engine.descriptor.DynamicDescendantFilter
-
- All Implemented Interfaces:
java.util.function.BiPredicate<UniqueId,java.lang.Integer>
- Direct Known Subclasses:
DynamicDescendantFilter.WithoutIndexFiltering
@API(status=INTERNAL, since="5.1") public class DynamicDescendantFilter extends java.lang.Object implements java.util.function.BiPredicate<UniqueId,java.lang.Integer>Filter for dynamic descendants ofTestDescriptorsthat implementFilterable.- Since:
- 5.1
- See Also:
Filterable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDynamicDescendantFilter.Modeprivate classDynamicDescendantFilter.WithoutIndexFiltering
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.lang.Integer>allowedIndicesprivate java.util.Set<UniqueId>allowedUniqueIdsprivate DynamicDescendantFilter.Modemode
-
Constructor Summary
Constructors Constructor Description DynamicDescendantFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallowAll()voidallowIndex(int index)voidallowIndex(java.util.Set<java.lang.Integer> indices)voidallowUniqueIdPrefix(UniqueId uniqueId)protected DynamicDescendantFilterconfigure(java.util.function.UnaryOperator<UniqueId> uniqueIdTransformer, DynamicDescendantFilter copy)DynamicDescendantFiltercopy(java.util.function.UnaryOperator<UniqueId> uniqueIdTransformer)private booleanisEverythingAllowed()private booleanisPrefixOrViceVersa(UniqueId currentUniqueId, UniqueId allowedUniqueId)private booleanisUniqueIdAllowed(UniqueId uniqueId)booleantest(UniqueId uniqueId, java.lang.Integer index)DynamicDescendantFilterwithoutIndexFiltering()
-
-
-
Field Detail
-
allowedUniqueIds
private final java.util.Set<UniqueId> allowedUniqueIds
-
allowedIndices
private final java.util.Set<java.lang.Integer> allowedIndices
-
mode
private DynamicDescendantFilter.Mode mode
-
-
Method Detail
-
allowUniqueIdPrefix
public void allowUniqueIdPrefix(UniqueId uniqueId)
-
allowIndex
public void allowIndex(int index)
-
allowIndex
public void allowIndex(java.util.Set<java.lang.Integer> indices)
-
allowAll
public void allowAll()
-
test
public boolean test(UniqueId uniqueId, java.lang.Integer index)
- Specified by:
testin interfacejava.util.function.BiPredicate<UniqueId,java.lang.Integer>
-
isEverythingAllowed
private boolean isEverythingAllowed()
-
isUniqueIdAllowed
private boolean isUniqueIdAllowed(UniqueId uniqueId)
-
isPrefixOrViceVersa
private boolean isPrefixOrViceVersa(UniqueId currentUniqueId, UniqueId allowedUniqueId)
-
withoutIndexFiltering
public DynamicDescendantFilter withoutIndexFiltering()
-
copy
public DynamicDescendantFilter copy(java.util.function.UnaryOperator<UniqueId> uniqueIdTransformer)
-
configure
protected DynamicDescendantFilter configure(java.util.function.UnaryOperator<UniqueId> uniqueIdTransformer, DynamicDescendantFilter copy)
-
-