Package io.thestencil.client.api
Class ImmutableLinkMutator
- java.lang.Object
-
- io.thestencil.client.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()BooleangetDevMode()com.google.common.collect.ImmutableList<StencilClient.LocaleLabel>getLabels()StringgetLinkId()StringgetType()StringgetValue()inthashCode()Computes a hash code from attributes:linkId,value,type,labels,articles,devMode.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.ImmutableLinkMutatorwithDevMode(Boolean value)Copy the current immutable object by setting a value for thedevModeattribute.ImmutableLinkMutatorwithLabels(StencilClient.LocaleLabel... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableLinkMutatorwithLabels(Iterable<? extends StencilClient.LocaleLabel> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableLinkMutatorwithLinkId(String value)Copy the current immutable object by setting a value for thelinkIdattribute.ImmutableLinkMutatorwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableLinkMutatorwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getLinkId
public String getLinkId()
- Specified by:
getLinkIdin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
linkIdattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
valueattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
typeattribute
-
getLabels
@Nullable public com.google.common.collect.ImmutableList<StencilClient.LocaleLabel> getLabels()
- Specified by:
getLabelsin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
labelsattribute
-
getArticles
@Nullable public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
articlesattribute
-
getDevMode
@Nullable public Boolean getDevMode()
- Specified by:
getDevModein interfaceUpdateBuilder.LinkMutator- Returns:
- The value of the
devModeattribute
-
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
-
withValue
public final ImmutableLinkMutator withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- 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
-
withLabels
public final ImmutableLinkMutator withLabels(@Nullable StencilClient.LocaleLabel... elements)
Copy the current immutable object with elements that replace the content oflabels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLabels
public final ImmutableLinkMutator withLabels(@Nullable Iterable<? extends StencilClient.LocaleLabel> elements)
Copy the current immutable object with elements that replace the content oflabels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of labels elements to set- Returns:
- A modified copy of
thisobject
-
withArticles
public final ImmutableLinkMutator withArticles(@Nullable 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(@Nullable 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
-
withDevMode
public final ImmutableLinkMutator withDevMode(@Nullable Boolean value)
Copy the current immutable object by setting a value for thedevModeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for devMode (can benull)- Returns:
- A modified copy of the
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,value,type,labels,articles,devMode.
-
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.value(String) // requiredvalue.type(String) // requiredtype.labels(List<io.thestencil.client.api.StencilClient.LocaleLabel> | null) // nullablelabels.articles(List<String> | null) // nullablearticles.devMode(Boolean | null) // nullabledevMode.build();- Returns:
- A new ImmutableLinkMutator builder
-
-