Class ImmutableTopicNameData.Builder
- java.lang.Object
-
- io.thestencil.client.spi.staticontent.visitors.ImmutableTopicNameData.Builder
-
- Enclosing class:
- ImmutableTopicNameData
@NotThreadSafe public static final class ImmutableTopicNameData.Builder extends Object
Builds instances of typeImmutableTopicNameData. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTopicNameDatabuild()Builds a newImmutableTopicNameData.ImmutableTopicNameData.Builderfrom(SiteVisitor.TopicNameData instance)Fill a builder with attribute values from the providedTopicNameDatainstance.ImmutableTopicNameData.Builderlocale(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thelocalemap.ImmutableTopicNameData.Builderpath(String path)Initializes the value for thepathattribute.ImmutableTopicNameData.BuilderputAllLocale(Map<String,? extends String> entries)Put all mappings from the specified map as entries tolocalemap.ImmutableTopicNameData.BuilderputLocale(String key, String value)Put one entry to thelocalemap.ImmutableTopicNameData.BuilderputLocale(Map.Entry<String,? extends String> entry)Put one entry to thelocalemap.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder from(SiteVisitor.TopicNameData instance)
Fill a builder with attribute values from the providedTopicNameDatainstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
path
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder path(String path)
Initializes the value for thepathattribute.- Parameters:
path- The value for path- Returns:
thisbuilder for use in a chained invocation
-
putLocale
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder putLocale(String key, String value)
Put one entry to thelocalemap.- Parameters:
key- The key in the locale mapvalue- The associated value in the locale map- Returns:
thisbuilder for use in a chained invocation
-
putLocale
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder putLocale(Map.Entry<String,? extends String> entry)
Put one entry to thelocalemap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
locale
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder locale(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for thelocalemap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the locale map- Returns:
thisbuilder for use in a chained invocation
-
putAllLocale
@CanIgnoreReturnValue public final ImmutableTopicNameData.Builder putAllLocale(Map<String,? extends String> entries)
Put all mappings from the specified map as entries tolocalemap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the locale map- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTopicNameData build()
Builds a newImmutableTopicNameData.- Returns:
- An immutable instance of TopicNameData
- Throws:
IllegalStateException- if any required attributes are missing
-
-