Package io.thestencil.client.api
Class ImmutablePageMutator
- java.lang.Object
-
- io.thestencil.client.api.ImmutablePageMutator
-
- All Implemented Interfaces:
UpdateBuilder.PageMutator
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePageMutator extends Object implements UpdateBuilder.PageMutator
Immutable implementation ofUpdateBuilder.PageMutator.Use the builder to create immutable instances:
ImmutablePageMutator.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePageMutator.BuilderBuilds instances of typeImmutablePageMutator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePageMutator.Builderbuilder()Creates a builder forImmutablePageMutator.static ImmutablePageMutatorcopyOf(UpdateBuilder.PageMutator instance)Creates an immutable copy of aUpdateBuilder.PageMutatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePageMutatorthat have equal attribute values.StringgetContent()StringgetLocale()StringgetPageId()inthashCode()Computes a hash code from attributes:pageId,content,locale.StringtoString()Prints the immutable valuePageMutatorwith attribute values.ImmutablePageMutatorwithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutablePageMutatorwithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutablePageMutatorwithPageId(String value)Copy the current immutable object by setting a value for thepageIdattribute.
-
-
-
Method Detail
-
getPageId
public String getPageId()
- Specified by:
getPageIdin interfaceUpdateBuilder.PageMutator- Returns:
- The value of the
pageIdattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceUpdateBuilder.PageMutator- Returns:
- The value of the
contentattribute
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceUpdateBuilder.PageMutator- Returns:
- The value of the
localeattribute
-
withPageId
public final ImmutablePageMutator withPageId(String value)
Copy the current immutable object by setting a value for thepageIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pageId- Returns:
- A modified copy of the
thisobject
-
withContent
public final ImmutablePageMutator withContent(String value)
Copy the current immutable object by setting a value for thecontentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for content- Returns:
- A modified copy of the
thisobject
-
withLocale
public final ImmutablePageMutator withLocale(String value)
Copy the current immutable object by setting a value for thelocaleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for locale- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePageMutatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:pageId,content,locale.
-
toString
public String toString()
Prints the immutable valuePageMutatorwith attribute values.
-
copyOf
public static ImmutablePageMutator copyOf(UpdateBuilder.PageMutator instance)
Creates an immutable copy of aUpdateBuilder.PageMutatorvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PageMutator instance
-
builder
public static ImmutablePageMutator.Builder builder()
Creates a builder forImmutablePageMutator.ImmutablePageMutator.builder() .pageId(String) // requiredpageId.content(String) // requiredcontent.locale(String) // requiredlocale.build();- Returns:
- A new ImmutablePageMutator builder
-
-