com.holonplatform.core.property

## Interface PropertyBox.Builder

- Enclosing interface:
    PropertyBox

      public static interface PropertyBox.Builder

  Builder to build `PropertyBox` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `PropertyBox` | `build()` Build the `PropertyBox`
    `PropertyBox.Builder` | `copyValues(PropertyBox source)` Copy the given `propertyBox` property values only for properties of the source PropertyBox that have a matching with a property of the PropertyBox to build
    `PropertyBox.Builder` | `invalidAllowed(boolean invalidAllowed)` Set whether to accept invalid property values when using `PropertyBox.setValue(Property, Object)` to set a property value, i.e. to ignore any `Validator` registered for property.
    `<T> PropertyBox.Builder` | `set(Property<T> property, T value)` Set value of given `property`.
    `<T> PropertyBox.Builder` | `setIgnoreReadOnly(Property<T> property, T value)` Set value of given `property`, ignoring property read-only state.

- - ### Method Detail

    - #### invalidAllowed

          PropertyBox.Builder invalidAllowed(boolean invalidAllowed)

      Set whether to accept invalid property values when using `PropertyBox.setValue(Property, Object)` to set a property value, i.e. to ignore any `Validator` registered for property. If invalid values are not allowed and any property `Validator` do not validate the value, a `Validator.ValidationException` is thrown by `PropertyBox.setValue(Property, Object)`.
      Parameters:
        `invalidAllowed` - `true` to accept invalid property values (ignore validators), `false` otherwise
      Returns:
        this

    - #### set

          <T> PropertyBox.Builder set(Property<T> property,
                                      T value)

      Set value of given `property`. Value type must be consistent with declared `Property` type.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to set the value (not null)
        `value` - Value to set
      Returns:
        this

    - #### setIgnoreReadOnly

          <T> PropertyBox.Builder setIgnoreReadOnly(Property<T> property,
                                                    T value)

      Set value of given `property`, ignoring property read-only state.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to set the value (not null)
        `value` - Value to set
      Returns:
        this

    - #### copyValues

          PropertyBox.Builder copyValues(PropertyBox source)

      Copy the given `propertyBox` property values only for properties of the source PropertyBox that have a matching with a property of the PropertyBox to build
      Parameters:
        `source` - PropertyBox from which to copy the values
      Returns:
        this

    - #### build

          PropertyBox build()

      Build the `PropertyBox`
      Returns:
        PropertyBox instance

Copyright © 2017 The Holon Platform. All rights reserved.