Package io.thestencil.client.api
Class ImmutablePage
- java.lang.Object
-
- io.thestencil.client.api.ImmutablePage
-
- All Implemented Interfaces:
StencilClient.EntityBody,StencilClient.Page,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePage extends Object implements StencilClient.Page
Immutable implementation ofStencilClient.Page.Use the builder to create immutable instances:
ImmutablePage.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePage.BuilderBuilds instances of typeImmutablePage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePage.Builderbuilder()Creates a builder forImmutablePage.static ImmutablePagecopyOf(StencilClient.Page instance)Creates an immutable copy of aStencilClient.Pagevalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePagethat have equal attribute values.StringgetArticle()StringgetContent()StringgetLocale()inthashCode()Computes a hash code from attributes:article,locale,content.StringtoString()Prints the immutable valuePagewith attribute values.ImmutablePagewithArticle(String value)Copy the current immutable object by setting a value for thearticleattribute.ImmutablePagewithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutablePagewithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.
-
-
-
Method Detail
-
getArticle
public String getArticle()
- Specified by:
getArticlein interfaceStencilClient.Page- Returns:
- The value of the
articleattribute
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceStencilClient.Page- Returns:
- The value of the
localeattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceStencilClient.Page- Returns:
- The value of the
contentattribute
-
withArticle
public final ImmutablePage withArticle(String value)
Copy the current immutable object by setting a value for thearticleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for article- Returns:
- A modified copy of the
thisobject
-
withLocale
public final ImmutablePage 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
-
withContent
public final ImmutablePage 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePagethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:article,locale,content.
-
toString
public String toString()
Prints the immutable valuePagewith attribute values.
-
copyOf
public static ImmutablePage copyOf(StencilClient.Page instance)
Creates an immutable copy of aStencilClient.Pagevalue. 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 Page instance
-
builder
public static ImmutablePage.Builder builder()
Creates a builder forImmutablePage.ImmutablePage.builder() .article(String) // requiredarticle.locale(String) // requiredlocale.content(String) // requiredcontent.build();- Returns:
- A new ImmutablePage builder
-
-