Class LocalizedStringFieldBuilder
java.lang.Object
com.commercetools.importapi.models.customfields.LocalizedStringFieldBuilder
- All Implemented Interfaces:
Builder<LocalizedStringField>
LocalizedStringFieldBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LocalizedStringField localizedStringField = LocalizedStringField.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds LocalizedStringField with checking for non-null required valuesbuilds LocalizedStringField without checking for non-null required valuesgetValue()
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.static LocalizedStringFieldBuilder
of()
factory method for an instance of LocalizedStringFieldBuilderstatic LocalizedStringFieldBuilder
of
(LocalizedStringField template) create builder for LocalizedStringField instancevalue
(LocalizedString value) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
-
Constructor Details
-
LocalizedStringFieldBuilder
public LocalizedStringFieldBuilder()
-
-
Method Details
-
value
public LocalizedStringFieldBuilder value(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
public LocalizedStringFieldBuilder withValue(Function<LocalizedStringBuilder, LocalizedString> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
value
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
value
- value to be set- Returns:
- Builder
-
getValue
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- value
-
build
builds LocalizedStringField with checking for non-null required values- Specified by:
build
in interfaceBuilder<LocalizedStringField>
- Returns:
- LocalizedStringField
-
buildUnchecked
builds LocalizedStringField without checking for non-null required values- Returns:
- LocalizedStringField
-
of
factory method for an instance of LocalizedStringFieldBuilder- Returns:
- builder
-
of
create builder for LocalizedStringField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-