Class LocalizedEnumValueBuilder
java.lang.Object
com.commercetools.history.models.change_value.LocalizedEnumValueBuilder
- All Implemented Interfaces:
Builder<LocalizedEnumValue>
LocalizedEnumValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LocalizedEnumValue localizedEnumValue = LocalizedEnumValue.builder()
.key("{key}")
.label(labelBuilder -> labelBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds LocalizedEnumValue with checking for non-null required valuesbuilds LocalizedEnumValue without checking for non-null required valuesgetKey()
Key of the value used as a programmatic identifier.getLabel()
Descriptive localized label of the value.Key of the value used as a programmatic identifier.label
(LocalizedString label) Descriptive localized label of the value.Descriptive localized label of the value.static LocalizedEnumValueBuilder
of()
factory method for an instance of LocalizedEnumValueBuilderstatic LocalizedEnumValueBuilder
of
(LocalizedEnumValue template) create builder for LocalizedEnumValue instanceDescriptive localized label of the value.
-
Constructor Details
-
LocalizedEnumValueBuilder
public LocalizedEnumValueBuilder()
-
-
Method Details
-
key
Key of the value used as a programmatic identifier.
- Parameters:
key
- value to be set- Returns:
- Builder
-
label
public LocalizedEnumValueBuilder label(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Descriptive localized label of the value.
- Parameters:
builder
- function to build the label value- Returns:
- Builder
-
withLabel
public LocalizedEnumValueBuilder withLabel(Function<LocalizedStringBuilder, LocalizedString> builder) Descriptive localized label of the value.
- Parameters:
builder
- function to build the label value- Returns:
- Builder
-
label
Descriptive localized label of the value.
- Parameters:
label
- value to be set- Returns:
- Builder
-
getKey
Key of the value used as a programmatic identifier.
- Returns:
- key
-
getLabel
Descriptive localized label of the value.
- Returns:
- label
-
build
builds LocalizedEnumValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<LocalizedEnumValue>
- Returns:
- LocalizedEnumValue
-
buildUnchecked
builds LocalizedEnumValue without checking for non-null required values- Returns:
- LocalizedEnumValue
-
of
factory method for an instance of LocalizedEnumValueBuilder- Returns:
- builder
-
of
create builder for LocalizedEnumValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-