Class DynamicDescendantFilter

  • All Implemented Interfaces:
    java.util.function.BiPredicate<org.junit.platform.engine.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<org.junit.platform.engine.UniqueId,​java.lang.Integer>
    Filter for dynamic descendants of TestDescriptors that implement Filterable.
    Since:
    5.1
    See Also:
    Filterable
    • Field Detail

      • allowedUniqueIds

        private final java.util.Set<org.junit.platform.engine.UniqueId> allowedUniqueIds
      • allowedIndices

        private final java.util.Set<java.lang.Integer> allowedIndices
    • Constructor Detail

      • DynamicDescendantFilter

        public DynamicDescendantFilter()
    • Method Detail

      • allowUniqueIdPrefix

        public void allowUniqueIdPrefix​(org.junit.platform.engine.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​(org.junit.platform.engine.UniqueId uniqueId,
                            java.lang.Integer index)
        Specified by:
        test in interface java.util.function.BiPredicate<org.junit.platform.engine.UniqueId,​java.lang.Integer>
      • isEverythingAllowed

        private boolean isEverythingAllowed()
      • isUniqueIdAllowed

        private boolean isUniqueIdAllowed​(org.junit.platform.engine.UniqueId uniqueId)
      • isPrefixOrViceVersa

        private boolean isPrefixOrViceVersa​(org.junit.platform.engine.UniqueId currentUniqueId,
                                            org.junit.platform.engine.UniqueId allowedUniqueId)
      • copy

        public DynamicDescendantFilter copy​(java.util.function.UnaryOperator<org.junit.platform.engine.UniqueId> uniqueIdTransformer)