T
- the built typepublic interface ObjectBuilder<T>
This interface describes the contract for a class which implements the builder pattern inside WUIC. Because objects
can be built in so many different ways, the builder has very abstract behavior. Its contains a property(String, Object)
method to configure the state of the built objects.
Modifier and Type | Method and Description |
---|---|
T |
build()
Builds a new
NutDao thanks to the current state
of this builder. |
ObjectBuilder<T> |
disableSupport(String key,
Object value)
Disables the support of a property with a particular value.
|
Map<String,Object> |
getProperties()
Gets the property
Map . |
Object |
property(String key)
Gets the property identified by the given key.
|
ObjectBuilder<T> |
property(String key,
Object value)
Decorates this builder with a property.
|
ObjectBuilder<T> property(String key, Object value)
Decorates this builder with a property.
Throws an IllegalArgumentException
if the property key is not supported or if the value is incorrect.
key
- the keyvalue
- the valueObjectBuilder<T> disableSupport(String key, Object value)
Disables the support of a property with a particular value. Any future setting which match the given key/value pair
(when calling property(String, Object)
) will result in an IllegalArgumentException
.
key
- the keyvalue
- the valueObject property(String key)
Gets the property identified by the given key.
Throws an IllegalArgumentException
if the property key is not supported.
key
- the keyT build()
Builds a new NutDao
thanks to the current state
of this builder.
If the NutDao
could not be built, then an IllegalArgumentException
should be thrown.
NutDao
Copyright © 2012-2015. All Rights Reserved.