Package io.thestencil.client.api
Class ImmutableCreateTemplate
- java.lang.Object
-
- io.thestencil.client.api.ImmutableCreateTemplate
-
- All Implemented Interfaces:
CreateBuilder.CreateTemplate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCreateTemplate extends Object implements CreateBuilder.CreateTemplate
Immutable implementation ofCreateBuilder.CreateTemplate.Use the builder to create immutable instances:
ImmutableCreateTemplate.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreateTemplate.BuilderBuilds instances of typeImmutableCreateTemplate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreateTemplate.Builderbuilder()Creates a builder forImmutableCreateTemplate.static ImmutableCreateTemplatecopyOf(CreateBuilder.CreateTemplate instance)Creates an immutable copy of aCreateBuilder.CreateTemplatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCreateTemplatethat have equal attribute values.StringgetContent()StringgetDescription()StringgetName()StringgetType()inthashCode()Computes a hash code from attributes:name,description,content,type.StringtoString()Prints the immutable valueCreateTemplatewith attribute values.ImmutableCreateTemplatewithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableCreateTemplatewithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableCreateTemplatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCreateTemplatewithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceCreateBuilder.CreateTemplate- Returns:
- The value of the
nameattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceCreateBuilder.CreateTemplate- Returns:
- The value of the
descriptionattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceCreateBuilder.CreateTemplate- Returns:
- The value of the
contentattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceCreateBuilder.CreateTemplate- Returns:
- The value of the
typeattribute
-
withName
public final ImmutableCreateTemplate withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableCreateTemplate 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
-
withContent
public final ImmutableCreateTemplate 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
-
withType
public final ImmutableCreateTemplate 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCreateTemplatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,description,content,type.
-
toString
public String toString()
Prints the immutable valueCreateTemplatewith attribute values.
-
copyOf
public static ImmutableCreateTemplate copyOf(CreateBuilder.CreateTemplate instance)
Creates an immutable copy of aCreateBuilder.CreateTemplatevalue. 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 CreateTemplate instance
-
builder
public static ImmutableCreateTemplate.Builder builder()
Creates a builder forImmutableCreateTemplate.ImmutableCreateTemplate.builder() .name(String) // requiredname.description(String) // requireddescription.content(String) // requiredcontent.type(String) // requiredtype.build();- Returns:
- A new ImmutableCreateTemplate builder
-
-