Class FeatureBasedContainerFilterService


  • @Component("tapirFeatureBasedContainerFilterService")
    public class FeatureBasedContainerFilterService
    extends java.lang.Object
    This service allows the filtering of FeatureBasedContainer elements.
    Since:
    3.3.0
    Author:
    Nils Christian Ehmke <[email protected]>
    • Constructor Detail

      • FeatureBasedContainerFilterService

        public FeatureBasedContainerFilterService()
    • Method Detail

      • filterByActivatedFeatures

        public <T> java.lang.Iterable<T> filterByActivatedFeatures​(java.lang.Iterable<FeatureBasedContainer<T>> iterable)
        Filters the given Iterable by evaluation the FeatureExpression of each container. Only those containers without an expression or whose expression evaluates to true are contained in the returned Iterable.
        Type Parameters:
        T - The type of the contained elements.
        Parameters:
        iterable - The input Iterable. Must not be null.
        Returns:
        A new Iterable containing only the active elements.
        Throws:
        java.lang.NullPointerException - If the given Iterable is null.
        Since:
        3.3.0