public static interface PropertyBox.Builder
PropertyBox instances.| 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 |
equalsHandler(EqualsHandler<PropertyBox> equalsHandler)
Set the predicate to use to check the
PropertyBox object equality using the
Object.equals(Object) method. |
PropertyBox.Builder |
hashCodeProvider(HashCodeProvider<PropertyBox> hashCodeProvider)
Set the function to use to provide the
PropertyBox object hash code using the
Object.hashCode() method. |
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. |
<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. |
PropertyBox.Builder invalidAllowed(boolean invalidAllowed)
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).invalidAllowed - true to accept invalid property values (ignore validators),
false otherwisePropertyBox.Builder equalsHandler(EqualsHandler<PropertyBox> equalsHandler)
PropertyBox object equality using the
Object.equals(Object) method.
By default, PropertyBox objects equality is checked using the property set identifier property
values, if available.
If a custom equals handler is provided, a hashCode provider should be provided too,
using the hashCodeProvider(HashCodeProvider) builder mthod.
equalsHandler - The function to use to check PropertyBox object equalityPropertySet.getIdentifiers()PropertyBox.Builder hashCodeProvider(HashCodeProvider<PropertyBox> hashCodeProvider)
PropertyBox object hash code using the
Object.hashCode() method.
By default, PropertyBox objects hash code is calculated using the property set identifier property
values, if available.
hashCodeProvider - The function to use to provide the PropertyBox object hash codePropertySet.getIdentifiers()<T> PropertyBox.Builder set(Property<T> property, T value)
property. Value type must be consistent with declared Property type.T - Property typeproperty - Property for which to set the value (not null)value - Value to set<T> PropertyBox.Builder setIgnoreReadOnly(Property<T> property, T value)
property, ignoring property read-only state.T - Property typeproperty - Property for which to set the value (not null)value - Value to setPropertyBox.Builder copyValues(PropertyBox source)
propertyBox property values only for properties of the source PropertyBox that
have a matching with a property of the PropertyBox to buildsource - PropertyBox from which to copy the valuesPropertyBox build()
PropertyBoxCopyright © 2019 The Holon Platform. All rights reserved.