Class FieldContainerBuilder
java.lang.Object
com.commercetools.api.models.type.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()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionJSON object with keys matching the names of Custom Fields (that is,name
s in the FieldDefinitions) and values given by CustomFieldValue.build()
builds FieldContainer with checking for non-null required valuesbuilds FieldContainer without checking for non-null required valuesJSON object with keys matching the names of Custom Fields (that is,name
s in the FieldDefinitions) and values given by CustomFieldValue.static FieldContainerBuilder
of()
factory method for an instance of FieldContainerBuilderstatic FieldContainerBuilder
of
(FieldContainer template) create builder for FieldContainer instanceJSON object with keys matching the names of Custom Fields (that is,name
s in the FieldDefinitions) and values given by CustomFieldValue.
-
Constructor Details
-
FieldContainerBuilder
public FieldContainerBuilder()
-
-
Method Details
-
values
JSON object with keys matching the names of Custom Fields (that is,
name
s in the FieldDefinitions) and values given by CustomFieldValue.- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
JSON object with keys matching the names of Custom Fields (that is,
name
s in the FieldDefinitions) and values given by CustomFieldValue.- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getValues
JSON object with keys matching the names of Custom Fields (that is,
name
s in the FieldDefinitions) and values given by CustomFieldValue.- 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
-