Package org.osgi.service.repository
Interface ExpressionCombiner
@ProviderType
public interface ExpressionCombiner
An
ExpressionCombiner
can be used to combine requirement expressions
into a single complex requirement expression using the and
,
or
and not
operators.- Since:
- 1.1
- "ThreadSafe"
-
Method Summary
Modifier and TypeMethodDescriptionand
(RequirementExpression expr1, RequirementExpression expr2) Combine twoRequirementExpression
s into a requirement expression using theand
operator.and
(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs) Combine multipleRequirementExpression
s into a requirement expression using theand
operator.identity
(Requirement req) Wrap aRequirement
in anIdentityExpression
.not
(RequirementExpression expr) Return the negation of aRequirementExpression
.or
(RequirementExpression expr1, RequirementExpression expr2) Combine twoRequirementExpression
s into a requirement expression using theor
operator.or
(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs) Combine multipleRequirementExpression
s into a requirement expression using theor
operator.
-
Method Details
-
and
Combine twoRequirementExpression
s into a requirement expression using theand
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expression- Returns:
- An
AndExpression
representing anand
of the specified requirement expressions.
-
and
AndExpression and(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs) Combine multipleRequirementExpression
s into a requirement expression using theand
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expressionmoreExprs
- Optional, additional requirement expressions to combine into the returned requirement expression.- Returns:
- An
AndExpression
representing anand
of the specified requirement expressions.
-
identity
Wrap aRequirement
in anIdentityExpression
. This can be useful when working with a combination ofRequirement
s andRequirementExpresion
s.- Parameters:
req
- The requirement to wrap in a requirement expression.- Returns:
- An
IdentityExpression
representing the specified requirement.
-
not
Return the negation of aRequirementExpression
.- Parameters:
expr
- The requirement expression to negate.- Returns:
- A
NotExpression
representing thenot
of the specified requirement expression.
-
or
Combine twoRequirementExpression
s into a requirement expression using theor
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expression- Returns:
- An
OrExpression
representing anor
of the specified requirement expressions.
-
or
OrExpression or(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs) Combine multipleRequirementExpression
s into a requirement expression using theor
operator.- Parameters:
expr1
- The first requirement expression to combine into the returned requirement expression.expr2
- The second requirement expression to combine into the returned requirement expressionmoreExprs
- Optional, additional requirement expressions to combine into the returned requirement expression.- Returns:
- An
OrExpression
representing anor
of the specified requirement expressions.
-