ExpressionCombiner
Date: 2016-06-25

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

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AndExpression` | `and(RequirementExpression expr1, RequirementExpression expr2)` Combine two `RequirementExpression`s into a requirement expression using the `and` operator.
    `AndExpression` | `and(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)` Combine multiple `RequirementExpression`s into a requirement expression using the `and` operator.
    `IdentityExpression` | `identity(org.osgi.resource.Requirement req)` Wrap a `Requirement` in an `IdentityExpression`.
    `NotExpression` | `not(RequirementExpression expr)` Return the negation of a `RequirementExpression`.
    `OrExpression` | `or(RequirementExpression expr1, RequirementExpression expr2)` Combine two `RequirementExpression`s into a requirement expression using the `or` operator.
    `OrExpression` | `or(RequirementExpression expr1, RequirementExpression expr2, RequirementExpression... moreExprs)` Combine multiple `RequirementExpression`s into a requirement expression using the `or` operator.

- - ### Method Detail

    - #### and

          AndExpression and(RequirementExpression expr1,
                          RequirementExpression expr2)

      Combine two `RequirementExpression`s into a requirement expression using the `and` 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 an `and` of the specified requirement expressions.

    - #### and

          AndExpression and(RequirementExpression expr1,
                          RequirementExpression expr2,
                          RequirementExpression... moreExprs)

      Combine multiple `RequirementExpression`s into a requirement expression using the `and` 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
        `moreExprs` - Optional, additional requirement expressions to combine into the returned requirement expression.
      Returns:
        An `AndExpression` representing an `and` of the specified requirement expressions.

    - #### identity

          IdentityExpression identity(org.osgi.resource.Requirement req)

      Wrap a `Requirement` in an `IdentityExpression`. This can be useful when working with a combination of `Requirement`s and `RequirementExpresion`s.
      Parameters:
        `req` - The requirement to wrap in a requirement expression.
      Returns:
        An `IdentityExpression` representing the specified requirement.

    - #### not

          NotExpression not(RequirementExpression expr)

      Return the negation of a `RequirementExpression`.
      Parameters:
        `expr` - The requirement expression to negate.
      Returns:
        A `NotExpression` representing the `not` of the specified requirement expression.

    - #### or

          OrExpression or(RequirementExpression expr1,
                        RequirementExpression expr2)

      Combine two `RequirementExpression`s into a requirement expression using the `or` 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 an `or` of the specified requirement expressions.

    - #### or

          OrExpression or(RequirementExpression expr1,
                        RequirementExpression expr2,
                        RequirementExpression... moreExprs)

      Combine multiple `RequirementExpression`s into a requirement expression using the `or` 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
        `moreExprs` - Optional, additional requirement expressions to combine into the returned requirement expression.
      Returns:
        An `OrExpression` representing an `or` of the specified requirement expressions.