Class FeatureExpressionBuilder
- java.lang.Object
-
- de.bmiag.tapir.variant.feature.expression.FeatureExpressionBuilder
-
@Component("featureExpressionBuilder") public class FeatureExpressionBuilder extends java.lang.Object
Helps to buildfeature expressions
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description FeatureExpressionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActivatedFeatureExpression
activated(java.lang.Class<? extends Feature> feature)
Returns a feature expression which evaluates to true, if the given feature is activated by consulting theFeatureCheckService
.AllOfFeatureExpression
allOf(FeatureExpression... featureExpressions)
Returns a feature expression which evaluates to true if, and only if, all given feature expressions evaluate to true.AnyOfFeatureExpression
anyOf(FeatureExpression... featureExpressions)
Returns a feature expression which evaluates to true if at least one of the given featureExpressions evaluates to true.NotFeatureExpression
not(FeatureExpression featureExpression)
Returns a feature expression which negates the result of the given feature expression.
-
-
-
Method Detail
-
anyOf
public AnyOfFeatureExpression anyOf(FeatureExpression... featureExpressions)
Returns a feature expression which evaluates to true if at least one of the given featureExpressions evaluates to true.- Parameters:
featureExpressions
- the feature expressions- Returns:
- the
AnyOfFeatureExpression
- Since:
- 2.0.0
-
allOf
public AllOfFeatureExpression allOf(FeatureExpression... featureExpressions)
Returns a feature expression which evaluates to true if, and only if, all given feature expressions evaluate to true.- Parameters:
featureExpressions
- the feature expressions- Returns:
- the
AllOfFeatureExpression
- Since:
- 2.0.0
-
not
public NotFeatureExpression not(FeatureExpression featureExpression)
Returns a feature expression which negates the result of the given feature expression.- Parameters:
featureExpression
- the feature expression- Returns:
- the
NotFeatureExpression
- Since:
- 2.0.0
-
activated
public ActivatedFeatureExpression activated(java.lang.Class<? extends Feature> feature)
Returns a feature expression which evaluates to true, if the given feature is activated by consulting theFeatureCheckService
.- Parameters:
feature
- the feature- Returns:
- the
ActivatedFeatureExpression
- Since:
- 2.0.0
-
-