Class FieldContainerBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.FieldContainerBuilder
- All Implemented Interfaces:
Builder<FieldContainer>
FieldContainerBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
FieldContainer fieldContainer = FieldContainer.builder()
.//(//Builder -> //Builder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddValue
(String key, CustomField value) Mapping from the Custom Field name to the actual value.build()
builds FieldContainer with checking for non-null required valuesbuilds FieldContainer without checking for non-null required valuesMapping from the Custom Field name to the actual value.static FieldContainerBuilder
of()
factory method for an instance of FieldContainerBuilderstatic FieldContainerBuilder
of
(FieldContainer template) create builder for FieldContainer instancevalues
(Map<String, CustomField> values) Mapping from the Custom Field name to the actual value.
-
Constructor Details
-
FieldContainerBuilder
public FieldContainerBuilder()
-
-
Method Details
-
values
Mapping from the Custom Field name to the actual value.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Mapping from the Custom Field name to the actual value.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getValues
Mapping from the Custom Field name to the actual value.
- Returns:
- pattern properties
-
build
builds FieldContainer with checking for non-null required values- Specified by:
build
in interfaceBuilder<FieldContainer>
- Returns:
- FieldContainer
-
buildUnchecked
builds FieldContainer without checking for non-null required values- Returns:
- FieldContainer
-
of
factory method for an instance of FieldContainerBuilder- Returns:
- builder
-
of
create builder for FieldContainer instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-