Package org.ec4j.core.model
Class Section.Builder
java.lang.Object
org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder<Section.Builder>
org.ec4j.core.model.Section.Builder
- Enclosing class:
Section
A
Section builder.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Globprivate boolean(package private) final EditorConfig.Builderprivate Map<String, Property.Builder> Fields inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapters -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(EditorConfig.Builder parentBuilder) Constructs a newSection.Builder -
Method Summary
Modifier and TypeMethodDescriptionApplies the defaults required by the core-tests, if necessary.build()Adds thisSection.BuildertoparentBuilderusingEditorConfig.Builder.section(Section.Builder)and returns the parentEditorConfig.Builder.Sets theGlobparentAware(boolean parentAware) properties(Collection<Property.Builder> properties) Adds multipleProperty.Builders toproperties.properties(Property.Builder... properties) Adds multipleProperty.Builders toproperties.property(Property.Builder property) Adds the givenProperty.Buildertoproperties.Methods inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapter, adapters, adapters, sealAdapters
-
Field Details
-
glob
-
parentAware
private boolean parentAware -
parentBuilder
-
properties
-
-
Constructor Details
-
Builder
Constructs a newSection.Builder- Parameters:
parentBuilder- can benullif you do not to callcloseSection()
-
-
Method Details
-
applyDefaults
Applies the defaults required by the core-tests, if necessary.- Returns:
- this
Section.Builder
-
build
- Returns:
- a new
Section
-
closeSection
Adds thisSection.BuildertoparentBuilderusingEditorConfig.Builder.section(Section.Builder)and returns the parentEditorConfig.Builder.- Returns:
- the parent
EditorConfig.Builder
-
glob
Sets theGlob- Parameters:
glob- theGlobto set- Returns:
- this
Section.Builder
-
openProperty
- Returns:
- a new
Property.Builder
-
parentAware
- Parameters:
parentAware- iftruetheSection.getProperties()of the resultingSectionwill have the Section set in their adapters (which can be used as the link to the parentSection); othwise the seczion will not be added toProperty's adapters- Returns:
- this
Section.Builder
-
properties
Adds multipleProperty.Builders toproperties.- Parameters:
properties- theProperty.Builders to add- Returns:
- this
Section.Builder
-
properties
Adds multipleProperty.Builders toproperties.- Parameters:
properties- theProperty.Builders to add- Returns:
- this
Section.Builder
-
property
Adds the givenProperty.Buildertoproperties.- Parameters:
property- theProperty.Builderto add- Returns:
- this
Section.Builder
-