Package io.thestencil.client.api
Class ImmutableCreateLink
- java.lang.Object
-
- io.thestencil.client.api.ImmutableCreateLink
-
- All Implemented Interfaces:
CreateBuilder.CreateLink
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCreateLink extends Object implements CreateBuilder.CreateLink
Immutable implementation ofCreateBuilder.CreateLink.Use the builder to create immutable instances:
ImmutableCreateLink.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreateLink.BuilderBuilds instances of typeImmutableCreateLink.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreateLink.Builderbuilder()Creates a builder forImmutableCreateLink.static ImmutableCreateLinkcopyOf(CreateBuilder.CreateLink instance)Creates an immutable copy of aCreateBuilder.CreateLinkvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCreateLinkthat have equal attribute values.com.google.common.collect.ImmutableList<String>getArticles()com.google.common.collect.ImmutableList<StencilClient.LocaleLabel>getLabels()StringgetType()StringgetValue()inthashCode()Computes a hash code from attributes:value,type,articles,labels.StringtoString()Prints the immutable valueCreateLinkwith attribute values.ImmutableCreateLinkwithArticles(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableCreateLinkwithArticles(String... elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableCreateLinkwithLabels(StencilClient.LocaleLabel... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableCreateLinkwithLabels(Iterable<? extends StencilClient.LocaleLabel> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableCreateLinkwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableCreateLinkwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getValue
public String getValue()
- Specified by:
getValuein interfaceCreateBuilder.CreateLink- Returns:
- The value of the
valueattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceCreateBuilder.CreateLink- Returns:
- The value of the
typeattribute
-
getArticles
public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceCreateBuilder.CreateLink- Returns:
- The value of the
articlesattribute
-
getLabels
public com.google.common.collect.ImmutableList<StencilClient.LocaleLabel> getLabels()
- Specified by:
getLabelsin interfaceCreateBuilder.CreateLink- Returns:
- The value of the
labelsattribute
-
withValue
public final ImmutableCreateLink 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 ImmutableCreateLink 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 ImmutableCreateLink 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 ImmutableCreateLink 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
-
withLabels
public final ImmutableCreateLink withLabels(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 ImmutableCreateLink withLabels(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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCreateLinkthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:value,type,articles,labels.
-
toString
public String toString()
Prints the immutable valueCreateLinkwith attribute values.
-
copyOf
public static ImmutableCreateLink copyOf(CreateBuilder.CreateLink instance)
Creates an immutable copy of aCreateBuilder.CreateLinkvalue. 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 CreateLink instance
-
builder
public static ImmutableCreateLink.Builder builder()
Creates a builder forImmutableCreateLink.ImmutableCreateLink.builder() .value(String) // requiredvalue.type(String) // requiredtype.addArticles|addAllArticles(String) //articleselements .addLabels|addAllLabels(io.thestencil.client.api.StencilClient.LocaleLabel) //labelselements .build();- Returns:
- A new ImmutableCreateLink builder
-
-