com.holonplatform.core.property

## Interface Property.Builder<T,P extends Property<T>,B extends Property.Builder<T,P,B>>

- Type Parameters:
    `T` - Property value type
    `P` - Property type
    `B` - Concrete builder type
  All Superinterfaces:
    Localizable.Builder<B>
  All Known Subinterfaces:
    BeanProperty.Builder<T>, BooleanProperty.BooleanPropertyBuilder, CollectionPathProperty.Builder<E,C,P,B>, CollectionProperty.Builder<E,C,P,B>, ListPathProperty.ListPathPropertyBuilder<T>, ListVirtualProperty.ListVirtualPropertyBuilder<T>, NumericProperty.NumericPropertyBuilder<N>, PathProperty.Builder<T,P,B>, PathProperty.PathPropertyBuilder<T>, PropertyBoxProperty.PropertyBoxPropertyBuilder, SetPathProperty.SetPathPropertyBuilder<T>, SetVirtualProperty.SetVirtualPropertyBuilder<T>, StringProperty.StringPropertyBuilder, TemporalProperty.TemporalPropertyBuilder<T>, VirtualProperty.Builder<T,P,B>, VirtualProperty.VirtualPropertyBuilder<T>
  Enclosing interface:
    Property<T>

      public static interface Property.Builder<T,P extends Property<T>,B extends Property.Builder<T,P,B>>
      extends Localizable.Builder<B>

  Base `Property` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <C> B` | `configuration(ConfigProperty<C> configurationProperty, C value)` Deprecated. Use `withConfiguration(ConfigProperty, Object)`
    `default B` | `configuration(String parameterName, Object value)` Deprecated. Use `withConfiguration(String, Object)`
    `<MODEL> B` | `converter(Class<MODEL> modelType, Function<MODEL,T> fromModel, Function<T,MODEL> toModel)` Set a `PropertyValueConverter` for given `modelType` using given conversion `Function`s: the `fromModel` function to convert a model type value into property value type, and the `toModel` function to perform the inverse operation, i.e. convert the property value type into model type.
    `B` | `converter(PropertyValueConverter<T,?> converter)` Sets the `PropertyValueConverter`.
    `B` | `equalsHandler(EqualsHandler<? super P> equalsHandler)` Set the predicate to use to check the property equality using the `Object.equals(Object)` method.
    `B` | `hashCodeProvider(HashCodeProvider<? super P> hashCodeProvider)` Set the function to use to provide the property hash code using the `Object.hashCode()` method.
    `B` | `localization(Localizable localizable)` Set the property localization using given `Localizable` definition.
    `B` | `temporalType(TemporalType temporalType)` Set the optional `TemporalType` specification for `Date` or `Calendar` type properties, which can be used to perform consistent operations on property value, such as presentation, rendering or persistence data manipulation.
    `default B` | `validator(Validator<T> validator)` Deprecated. Use `withValidator(Validator)`
    `default <C> B` | `withConfiguration(ConfigProperty<C> configurationProperty, C value)` Add a property configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
    `B` | `withConfiguration(String parameterName, Object value)` Add a property configuration parameter
    `B` | `withValidator(Validator<T> validator)` Add a property value `Validator`

    - ### Methods inherited from interface com.holonplatform.core.i18n.Localizable.Builder

      `message, message, messageArguments, messageCode`

- - ### Method Detail

    - #### localization

          B localization(Localizable localizable)

      Set the property localization using given `Localizable` definition.
      Parameters:
        `localizable` - The localizable to use to obtain property localization attributes (not null)
      Returns:
        this

    - #### withConfiguration

          B withConfiguration(String parameterName,
                              Object value)

      Add a property configuration parameter
      Parameters:
        `parameterName` - Parameter name to add to property configuration (not null)
        `value` - Configuration parameter value
      Returns:
        this

    - #### configuration

          @Deprecated
          default B configuration(String parameterName,
                                               Object value)

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

    - #### withConfiguration

          default <C> B withConfiguration(ConfigProperty<C> configurationProperty,
                                          C value)

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

    - #### configuration

          @Deprecated
          default <C> B configuration(ConfigProperty<C> configurationProperty,
                                                   C value)

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

    - #### temporalType

          B temporalType(TemporalType temporalType)

      Set the optional `TemporalType` specification for `Date` or `Calendar` type properties, which can be used to perform consistent operations on property value, such as presentation, rendering or persistence data manipulation.
      Parameters:
        `temporalType` - the property `TemporalType` to set
      Returns:
        this

    - #### converter

          B converter(PropertyValueConverter<T,?> converter)

      Sets the `PropertyValueConverter`.
      Parameters:
        `converter` - The converter to set
      Returns:
        this

    - #### converter

          <MODEL> B converter(Class<MODEL> modelType,
                              Function<MODEL,T> fromModel,
                              Function<T,MODEL> toModel)

      Set a `PropertyValueConverter` for given `modelType` using given conversion `Function`s: the `fromModel` function to convert a model type value into property value type, and the `toModel` function to perform the inverse operation, i.e. convert the property value type into model type. Then set this converter as `PropertyValueConverter` for the property.
      Type Parameters:
        `MODEL` - Model type
      Parameters:
        `modelType` - Model type class (not null)
        `fromModel` - Function to convert a model type value into property value type (not null)
        `toModel` - Function to convert a property value type value into model type (not null)
      Returns:
        this

    - #### withValidator

          B withValidator(Validator<T> validator)

      Add a property value `Validator`
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### validator

          @Deprecated
          default B validator(Validator<T> validator)

      Deprecated. Use `withValidator(Validator)`
      Add a property value `Validator`
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### equalsHandler

          B equalsHandler(EqualsHandler<? super P> equalsHandler)

      Set the predicate to use to check the property equality using the `Object.equals(Object)` method.

      If a custom `equals` handler is provided, a `hashCode` provider should be provided too, using the `hashCodeProvider(HashCodeProvider)` builder mthod.

      Parameters:
        `equalsHandler` - The function to use to check property equality
      Returns:
        this

    - #### hashCodeProvider

          B hashCodeProvider(HashCodeProvider<? super P> hashCodeProvider)

      Set the function to use to provide the property hash code using the `Object.hashCode()` method.
      Parameters:
        `hashCodeProvider` - The function to use to provide the property hash code
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.