com.holonplatform.core.property

## Interface PropertySet.Builder<P extends Property>

- Type Parameters:
    `P` - Concrete type of the properties contained in the set
  Enclosing interface:
    PropertySet<P extends Property>

      public static interface PropertySet.Builder<P extends Property>

  Builder to create `PropertySet` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `<PT extends P> PropertySet.Builder<P>` | `add(Iterable<PT> properties)` Add all the properties provided by given `Iterable` to the set.
    `<PT extends P> PropertySet.Builder<P>` | `add(PT property)` Add a property to the set.
    `PropertySet<P>` | `build()` Build `PropertySet` instance
    `default <C> PropertySet.Builder<P>` | `configuration(ConfigProperty<C> configurationProperty, C value)` Deprecated. Use `withConfiguration(ConfigProperty, Object)`
    `default PropertySet.Builder<P>` | `configuration(String name, Object value)` Deprecated. Use `withConfiguration(String, Object)`
    `default <PT extends P> PropertySet.Builder<P>` | `identifier(PT property)` Deprecated. Use `withIdentifier(Property)`
    `<PT extends P> PropertySet.Builder<P>` | `identifiers(Iterable<PT> properties)` Set given `properties` as property set identifiers.
    `default PropertySet.Builder<P>` | `identifiers(P... properties)` Set given `properties` as property set identifiers.
    `<PT extends P> PropertySet.Builder<P>` | `remove(Iterable<PT> properties)` Remove all the properties provided by given `Iterable` from the set.
    `<PT extends P> PropertySet.Builder<P>` | `remove(PT property)` Remove a property from the set.
    `default <C> PropertySet.Builder<P>` | `withConfiguration(ConfigProperty<C> configurationProperty, C value)` Add a `PropertySet` configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
    `PropertySet.Builder<P>` | `withConfiguration(String name, Object value)` Add a `PropertySet` configuration parameter
    `<PT extends P> PropertySet.Builder<P>` | `withIdentifier(PT property)` Add given `property` to the property set identifiers.

- - ### Method Detail

    - #### add

          <PT extends P> PropertySet.Builder<P> add(PT property)

      Add a property to the set.
      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `property` - The property to add (not null)
      Returns:
        this

    - #### add

          <PT extends P> PropertySet.Builder<P> add(Iterable<PT> properties)

      Add all the properties provided by given `Iterable` to the set.
      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `properties` - Properties `Iterable` to add (not null)
      Returns:
        this

    - #### remove

          <PT extends P> PropertySet.Builder<P> remove(PT property)

      Remove a property from the set.
      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `property` - The property to remove (not null)
      Returns:
        this

    - #### remove

          <PT extends P> PropertySet.Builder<P> remove(Iterable<PT> properties)

      Remove all the properties provided by given `Iterable` from the set.
      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `properties` - Properties `Iterable` to remove (not null)
      Returns:
        this

    - #### withIdentifier

          <PT extends P> PropertySet.Builder<P> withIdentifier(PT property)

      Add given `property` to the property set identifiers.

      The property to declare as identifier must be already present in the property set.

      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `property` - The property to declare as property set identifier (not null)
      Returns:
        this
      Throws:
        `IllegalStateException` - If the property to declare as identifier is not part of the property set
      Since:
        5.3.0

    - #### identifier

          @Deprecated
          default <PT extends P> PropertySet.Builder<P> identifier(PT property)

      Deprecated. Use `withIdentifier(Property)`
      Add given `property` to the property set identifiers.

      The property to declare as identifier must be already present in the property set.

      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `property` - The property to declare as property set identifier (not null)
      Returns:
        this
      Throws:
        `IllegalStateException` - If the property to declare as identifier is not part of the property set
      Since:
        5.1.0

    - #### identifiers

          <PT extends P> PropertySet.Builder<P> identifiers(Iterable<PT> properties)

      Set given `properties` as property set identifiers. Any previously declared identifier property will be replaced by given identifier properties.

      The properties to declare as identifiers must be already present in the property set.

      Type Parameters:
        `PT` - Actual property type
      Parameters:
        `properties` - The properties to declare as property set identifiers (not null)
      Returns:
        this
      Throws:
        `IllegalStateException` - If one of the properties to declare as identifier is not part of the property set
      Since:
        5.1.0

    - #### identifiers

          default PropertySet.Builder<P> identifiers(P... properties)

      Set given `properties` as property set identifiers. Any previously declared identifier property will be replaced by given identifier properties.

      The properties to declare as identifiers must be already present in the property set.

      Parameters:
        `properties` - The properties to declare as property set identifiers (not null)
      Returns:
        this
      Throws:
        `IllegalStateException` - If one of the properties to declare as identifier is not part of the property set
      Since:
        5.2.2

    - #### withConfiguration

          PropertySet.Builder<P> withConfiguration(String name,
                                                   Object value)

      Add a `PropertySet` configuration parameter
      Parameters:
        `name` - The parameter name to add (not null)
        `value` - The configuration parameter value
      Returns:
        this

    - #### configuration

          @Deprecated
          default PropertySet.Builder<P> configuration(String name,
                                                                    Object value)

      Deprecated. Use `withConfiguration(String, Object)`
      Add a `PropertySet` configuration parameter
      Parameters:
        `name` - The parameter name to add (not null)
        `value` - The configuration parameter value
      Returns:
        this

    - #### withConfiguration

          default <C> PropertySet.Builder<P> withConfiguration(ConfigProperty<C> configurationProperty,
                                                               C value)

      Add a `PropertySet` configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
      Type Parameters:
        `C` - Config property type
      Parameters:
        `configurationProperty` - The `ConfigProperty` to add (not null)
        `value` - The configuration property value
      Returns:
        this

    - #### configuration

          @Deprecated
          default <C> PropertySet.Builder<P> configuration(ConfigProperty<C> configurationProperty,
                                                                        C value)

      Deprecated. Use `withConfiguration(ConfigProperty, Object)`
      Add a `PropertySet` configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
      Type Parameters:
        `C` - Config property type
      Parameters:
        `configurationProperty` - The `ConfigProperty` to add (not null)
        `value` - The configuration property value
      Returns:
        this

    - #### build

          PropertySet<P> build()

      Build `PropertySet` instance
      Returns:
        PropertySet instance

Copyright © 2019 The Holon Platform. All rights reserved.