Class ReferenceFieldBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.ReferenceFieldBuilder
- All Implemented Interfaces:
Builder<ReferenceField>
ReferenceFieldBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ReferenceField referenceField = ReferenceField.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ReferenceField with checking for non-null required valuesbuilds ReferenceField without checking for non-null required valuesgetValue()
References a resource by keystatic ReferenceFieldBuilder
of()
factory method for an instance of ReferenceFieldBuilderstatic ReferenceFieldBuilder
of
(ReferenceField template) create builder for ReferenceField instancevalue
(KeyReference value) References a resource by keyvalue
(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) References a resource by key
-
Constructor Details
-
ReferenceFieldBuilder
public ReferenceFieldBuilder()
-
-
Method Details
-
value
References a resource by key
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
public ReferenceFieldBuilder value(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) References a resource by key
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
getValue
References a resource by key
- Returns:
- value
-
build
builds ReferenceField with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReferenceField>
- Returns:
- ReferenceField
-
buildUnchecked
builds ReferenceField without checking for non-null required values- Returns:
- ReferenceField
-
of
factory method for an instance of ReferenceFieldBuilder- Returns:
- builder
-
of
create builder for ReferenceField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-