RequirementBuilder
Date: 2016-06-25

org.osgi.service.repository

## Interface RequirementBuilder

-     @ProviderType
      public interface RequirementBuilder

  A builder for requirements.
  Since:
    1.1

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RequirementBuilder` | `addAttribute(java.lang.String name, java.lang.Object value)` Add an attribute to the set of attributes.
    `RequirementBuilder` | `addDirective(java.lang.String name, java.lang.String value)` Add a directive to the set of directives.
    `org.osgi.resource.Requirement` | `build()` Create a requirement based upon the values set in this requirement builder.
    `IdentityExpression` | `buildExpression()` Create a requirement expression for a requirement based upon the values set in this requirement builder.
    `RequirementBuilder` | `setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)` Replace all attributes with the attributes in the specified map.
    `RequirementBuilder` | `setDirectives(java.util.Map<java.lang.String,java.lang.String> directives)` Replace all directives with the directives in the specified map.
    `RequirementBuilder` | `setResource(org.osgi.resource.Resource resource)` Set the `Resource`.

- - ### Method Detail

    - #### addAttribute

          RequirementBuilder addAttribute(java.lang.String name,
                                        java.lang.Object value)

      Add an attribute to the set of attributes.
      Parameters:
        `name` - The attribute name.
        `value` - The attribute value.
      Returns:
        This requirement builder.

    - #### addDirective

          RequirementBuilder addDirective(java.lang.String name,
                                        java.lang.String value)

      Add a directive to the set of directives.
      Parameters:
        `name` - The directive name.
        `value` - The directive value.
      Returns:
        This requirement builder.

    - #### setAttributes

          RequirementBuilder setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)

      Replace all attributes with the attributes in the specified map.
      Parameters:
        `attributes` - The map of attributes.
      Returns:
        This requirement builder.

    - #### setDirectives

          RequirementBuilder setDirectives(java.util.Map<java.lang.String,java.lang.String> directives)

      Replace all directives with the directives in the specified map.
      Parameters:
        `directives` - The map of directives.
      Returns:
        This requirement builder.

    - #### setResource

          RequirementBuilder setResource(org.osgi.resource.Resource resource)

      Set the `Resource`.

      A resource is optional. This method will replace any previously set resource.

      Parameters:
        `resource` - The resource.
      Returns:
        This requirement builder.

    - #### build

          org.osgi.resource.Requirement build()

      Create a requirement based upon the values set in this requirement builder.
      Returns:
        A requirement created based upon the values set in this requirement builder.

    - #### buildExpression

          IdentityExpression buildExpression()

      Create a requirement expression for a requirement based upon the values set in this requirement builder.
      Returns:
        A requirement expression created for a requirement based upon the values set in this requirement builder.