Package de.bmiag.tapir.variant.service
Class FeatureBasedContainerFilterService
- java.lang.Object
-
- de.bmiag.tapir.variant.service.FeatureBasedContainerFilterService
-
@Component("tapirFeatureBasedContainerFilterService") public class FeatureBasedContainerFilterService extends java.lang.Object
This service allows the filtering ofFeatureBasedContainer
elements.- Since:
- 3.3.0
- Author:
- Nils Christian Ehmke <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description FeatureBasedContainerFilterService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.lang.Iterable<T>
filterByActivatedFeatures(java.lang.Iterable<FeatureBasedContainer<T>> iterable)
Filters the givenIterable
by evaluation theFeatureExpression
of each container.
-
-
-
Method Detail
-
filterByActivatedFeatures
public <T> java.lang.Iterable<T> filterByActivatedFeatures(java.lang.Iterable<FeatureBasedContainer<T>> iterable)
Filters the givenIterable
by evaluation theFeatureExpression
of each container. Only those containers without an expression or whose expression evaluates totrue
are contained in the returnedIterable
.- Type Parameters:
T
- The type of the contained elements.- Parameters:
iterable
- The inputIterable
. Must not benull
.- Returns:
- A new
Iterable
containing only the active elements. - Throws:
java.lang.NullPointerException
- If the givenIterable
isnull
.- Since:
- 3.3.0
-
-