Package io.thestencil.persistence.api
Class ImmutableLinkMutator
- java.lang.Object
-
- io.thestencil.persistence.api.ImmutableLinkMutator
-
- All Implemented Interfaces:
UpdateBuilder.LinkMutator
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLinkMutator extends Object implements UpdateBuilder.LinkMutator
Immutable implementation ofUpdateBuilder.LinkMutator.Use the builder to create immutable instances:
ImmutableLinkMutator.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLinkMutator.BuilderBuilds instances of typeImmutableLinkMutator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLinkMutator.Builderbuilder()Creates a builder forImmutableLinkMutator.static ImmutableLinkMutatorcopyOf(UpdateBuilder.LinkMutator instance)Creates an immutable copy of aUpdateBuilder.LinkMutatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLinkMutatorthat have equal attribute values.com.google.common.collect.ImmutableList<String>getArticles()StringgetContent()StringgetDescription()StringgetLinkId()StringgetLocale()StringgetType()inthashCode()Computes a hash code from attributes:linkId,content,locale,description,type,articles.StringtoString()Prints the immutable valueLinkMutatorwith attribute values.ImmutableLinkMutatorwithArticles(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableLinkMutatorwithArticles(String... elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableLinkMutatorwithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableLinkMutatorwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableLinkMutatorwithLinkId(String value)Copy the current immutable object by setting a value for thelinkIdattribute.ImmutableLinkMutatorwithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutableLinkMutatorwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getLinkId
public String getLinkId()
- Specified by:
getLinkIdin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
linkIdattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
contentattribute
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
localeattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
descriptionattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
typeattribute
-
getArticles
public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
articlesattribute
-
withLinkId
public final ImmutableLinkMutator withLinkId(String value)
Copy the current immutable object by setting a value for thelinkIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for linkId- Returns:
- A modified copy of the
thisobject
-
withContent
public final ImmutableLinkMutator 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 ImmutableLinkMutator 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
-
withDescription
public final ImmutableLinkMutator withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableLinkMutator withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withArticles
public final ImmutableLinkMutator withArticles(String... elements)
Copy the current immutable object with elements that replace the content ofarticles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArticles
public final ImmutableLinkMutator withArticles(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofarticles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of articles elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLinkMutatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:linkId,content,locale,description,type,articles.
-
toString
public String toString()
Prints the immutable valueLinkMutatorwith attribute values.
-
copyOf
public static ImmutableLinkMutator copyOf(UpdateBuilder.LinkMutator instance)
Creates an immutable copy of aUpdateBuilder.LinkMutatorvalue. 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 LinkMutator instance
-
builder
public static ImmutableLinkMutator.Builder builder()
Creates a builder forImmutableLinkMutator.ImmutableLinkMutator.builder() .linkId(String) // requiredlinkId.content(String) // requiredcontent.locale(String) // requiredlocale.description(String) // requireddescription.type(String) // requiredtype.addArticles|addAllArticles(String) //articleselements .build();- Returns:
- A new ImmutableLinkMutator builder
-
-