Package org.ec4j.core.model
Class Property.Builder
java.lang.Object
org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder<Property.Builder>
org.ec4j.core.model.Property.Builder
- Enclosing class:
Property
A
Property builder.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Stringprivate final Section.Builder(package private) PropertyType<?> (package private) PropertyType.PropertyValue<?> Fields inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Adds thisProperty.Builderto the parentSection.Builderusing parentSection.Builder.property(Property.Builder)and returns the parentSection.BuilderSets thename.type(PropertyType<?> type) Sets thevalue.value(PropertyType.PropertyValue<?> value) Sets thevalue.Methods inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapter, adapters, adapters, sealAdapters
-
Field Details
-
name
String name -
parentBuilder
-
type
PropertyType<?> type -
value
PropertyType.PropertyValue<?> value
-
-
Constructor Details
-
Builder
-
-
Method Details
-
build
- Returns:
- a new
Property
-
closeProperty
Adds thisProperty.Builderto the parentSection.Builderusing parentSection.Builder.property(Property.Builder)and returns the parentSection.Builder- Returns:
- the parent
Section.Builder
-
name
Sets thename. Note that you should prefer to usetype(PropertyType)if the type is known, becausetype(PropertyType)sets bothnameandtypebased on thePropertyType.- Parameters:
name- the key of this key value pair- Returns:
- this
Property.Builder
-
type
- Parameters:
type- thePropertyTypeto set- Returns:
- this
Property.Builder
-
value
Sets thevalue.- Parameters:
value- the value of this key value pair- Returns:
- this
Property.Builder
-
value
Sets thevalue.- Parameters:
value- the value of this key value pair- Returns:
- this
Property.Builder
-