Class LocalizedStringBuilder
java.lang.Object
com.commercetools.history.models.common.LocalizedStringBuilder
- All Implemented Interfaces:
Builder<LocalizedString>
LocalizedStringBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LocalizedString localizedString = LocalizedString.builder()
./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassign a pattern property to the builderbuild()
builds LocalizedString with checking for non-null required valuesbuilds LocalizedString without checking for non-null required valuesvalues of pattern propertiesstatic LocalizedStringBuilder
of()
factory method for an instance of LocalizedStringBuilderstatic LocalizedStringBuilder
of
(LocalizedString template) create builder for LocalizedString instanceassign pattern properties to the builder
-
Constructor Details
-
LocalizedStringBuilder
public LocalizedStringBuilder()
-
-
Method Details
-
values
assign pattern properties to the builder- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
assign a pattern property to the builder- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getValues
values of pattern properties- Returns:
- pattern properties
-
build
builds LocalizedString with checking for non-null required values- Specified by:
build
in interfaceBuilder<LocalizedString>
- Returns:
- LocalizedString
-
buildUnchecked
builds LocalizedString without checking for non-null required values- Returns:
- LocalizedString
-
of
factory method for an instance of LocalizedStringBuilder- Returns:
- builder
-
of
create builder for LocalizedString instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-