Class CustomBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.CustomBuilder
CustomBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Custom custom = Custom.builder()
.type(typeBuilder -> typeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Custom with checking for non-null required valuesbuilds Custom without checking for non-null required valuesfields
(FieldContainer fields) The Custom Fields of this object.The Custom Fields of this object.The Custom Fields of this object.getType()
The type that provides the field definitions for this object.static CustomBuilder
of()
factory method for an instance of CustomBuilderstatic CustomBuilder
create builder for Custom instancetype
(TypeKeyReference type) The type that provides the field definitions for this object.The type that provides the field definitions for this object.The Custom Fields of this object.The type that provides the field definitions for this object.
-
Constructor Details
-
CustomBuilder
public CustomBuilder()
-
-
Method Details
-
type
The type that provides the field definitions for this object.
- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
withType
The type that provides the field definitions for this object.
- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
type
The type that provides the field definitions for this object.
- Parameters:
type
- value to be set- Returns:
- Builder
-
fields
The Custom Fields of this object.
- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
withFields
The Custom Fields of this object.
- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
fields
The Custom Fields of this object.
- Parameters:
fields
- value to be set- Returns:
- Builder
-
getType
The type that provides the field definitions for this object.
- Returns:
- type
-
getFields
The Custom Fields of this object.
- Returns:
- fields
-
build
builds Custom with checking for non-null required values -
buildUnchecked
builds Custom without checking for non-null required values- Returns:
- Custom
-
of
factory method for an instance of CustomBuilder- Returns:
- builder
-
of
create builder for Custom instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-