Package io.thestencil.client.api
Class ImmutablePageMutator.Builder
- java.lang.Object
-
- io.thestencil.client.api.ImmutablePageMutator.Builder
-
- Enclosing class:
- ImmutablePageMutator
@NotThreadSafe public static final class ImmutablePageMutator.Builder extends Object
Builds instances of typeImmutablePageMutator. 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 ImmutablePageMutatorbuild()Builds a newImmutablePageMutator.ImmutablePageMutator.Buildercontent(String content)Initializes the value for thecontentattribute.ImmutablePageMutator.Builderfrom(UpdateBuilder.PageMutator instance)Fill a builder with attribute values from the providedPageMutatorinstance.ImmutablePageMutator.Builderlocale(String locale)Initializes the value for thelocaleattribute.ImmutablePageMutator.BuilderpageId(String pageId)Initializes the value for thepageIdattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePageMutator.Builder from(UpdateBuilder.PageMutator instance)
Fill a builder with attribute values from the providedPageMutatorinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
pageId
@CanIgnoreReturnValue public final ImmutablePageMutator.Builder pageId(String pageId)
Initializes the value for thepageIdattribute.- Parameters:
pageId- The value for pageId- Returns:
thisbuilder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutablePageMutator.Builder content(String content)
Initializes the value for thecontentattribute.- Parameters:
content- The value for content- Returns:
thisbuilder for use in a chained invocation
-
locale
@CanIgnoreReturnValue public final ImmutablePageMutator.Builder locale(String locale)
Initializes the value for thelocaleattribute.- Parameters:
locale- The value for locale- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePageMutator build()
Builds a newImmutablePageMutator.- Returns:
- An immutable instance of PageMutator
- Throws:
IllegalStateException- if any required attributes are missing
-
-