T - the type of the beanpublic interface BeanBuilder<T extends Bean>
This interface allows a bean to be created even if it is immutable.
| Modifier and Type | Method and Description |
|---|---|
T |
build()
Builds the bean from the state of the builder.
|
BeanBuilder<T> |
set(MetaProperty<?> property,
Object value)
Sets the value of a single property into the builder.
|
BeanBuilder<T> |
set(String propertyName,
Object value)
Sets the value of a single property into the builder.
|
BeanBuilder<T> |
setAll(Map<String,? extends Object> propertyValueMap)
Sets the value of a map of properties into the builder.
|
BeanBuilder<T> |
setString(MetaProperty<?> property,
String value)
Sets the value of a single property into the builder.
|
BeanBuilder<T> |
setString(String propertyName,
String value)
Sets the value of a single property into the builder.
|
BeanBuilder<T> set(String propertyName, Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
propertyName - the property name, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> set(MetaProperty<?> property, Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
property - the property, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> setString(String propertyName, String value)
This converts the string to the correct type for the property. Conversion uses Joda-Convert.
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
propertyName - the property name, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> setString(MetaProperty<?> property, String value)
This converts the string to the correct type for the property. Conversion uses Joda-Convert.
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
property - the property name, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> setAll(Map<String,? extends Object> propertyValueMap)
Each map entry is used as the input to set(String, Object).
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
propertyValueMap - the property name to value map, not nullthis, for chaining, not nullRuntimeException - optionally thrown if a property name is invalidCopyright © 2007–2013 Joda.org. All rights reserved.