All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.commercetools.history.models.common.LocalizedStringBuilder Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.history.models.common;

import java.util.*;

import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;

/**
 * LocalizedStringBuilder
 * 
* 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()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LocalizedStringBuilder implements Builder { private Map values = new HashMap<>(); /** * assign pattern properties to the builder * @param values properties to be set * @return Builder */ public LocalizedStringBuilder values(final Map values) { this.values = values; return this; } /** * assign a pattern property to the builder * @param key property name * @param value property value * @return Builder */ public LocalizedStringBuilder addValue(final String key, final String value) { if (this.values == null) { values = new HashMap<>(); } values.put(key, value); return this; } /** * values of pattern properties * @return pattern properties */ public Map getValues() { return this.values; } /** * builds LocalizedString with checking for non-null required values * @return LocalizedString */ public LocalizedString build() { return new LocalizedStringImpl(values); } /** * builds LocalizedString without checking for non-null required values * @return LocalizedString */ public LocalizedString buildUnchecked() { return new LocalizedStringImpl(values); } /** * factory method for an instance of LocalizedStringBuilder * @return builder */ public static LocalizedStringBuilder of() { return new LocalizedStringBuilder(); } /** * create builder for LocalizedString instance * @param template instance with prefilled values for the builder * @return builder */ public static LocalizedStringBuilder of(final LocalizedString template) { LocalizedStringBuilder builder = new LocalizedStringBuilder(); builder.values = template.values(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy