Package io.thestencil.client.api
Class ImmutableCreateArticle
- java.lang.Object
-
- io.thestencil.client.api.ImmutableCreateArticle
-
- All Implemented Interfaces:
CreateBuilder.CreateArticle
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCreateArticle extends Object implements CreateBuilder.CreateArticle
Immutable implementation ofCreateBuilder.CreateArticle.Use the builder to create immutable instances:
ImmutableCreateArticle.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreateArticle.BuilderBuilds instances of typeImmutableCreateArticle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreateArticle.Builderbuilder()Creates a builder forImmutableCreateArticle.static ImmutableCreateArticlecopyOf(CreateBuilder.CreateArticle instance)Creates an immutable copy of aCreateBuilder.CreateArticlevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCreateArticlethat have equal attribute values.StringgetName()IntegergetOrder()StringgetParentId()inthashCode()Computes a hash code from attributes:parentId,name,order.StringtoString()Prints the immutable valueCreateArticlewith attribute values.ImmutableCreateArticlewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCreateArticlewithOrder(Integer value)Copy the current immutable object by setting a value for theorderattribute.ImmutableCreateArticlewithParentId(String value)Copy the current immutable object by setting a value for theparentIdattribute.
-
-
-
Method Detail
-
getParentId
@Nullable public String getParentId()
- Specified by:
getParentIdin interfaceCreateBuilder.CreateArticle- Returns:
- The value of the
parentIdattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceCreateBuilder.CreateArticle- Returns:
- The value of the
nameattribute
-
getOrder
@Nullable public Integer getOrder()
- Specified by:
getOrderin interfaceCreateBuilder.CreateArticle- Returns:
- The value of the
orderattribute
-
withParentId
public final ImmutableCreateArticle withParentId(@Nullable String value)
Copy the current immutable object by setting a value for theparentIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentId (can benull)- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableCreateArticle 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
-
withOrder
public final ImmutableCreateArticle withOrder(@Nullable Integer value)
Copy the current immutable object by setting a value for theorderattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for order (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCreateArticlethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:parentId,name,order.
-
toString
public String toString()
Prints the immutable valueCreateArticlewith attribute values.
-
copyOf
public static ImmutableCreateArticle copyOf(CreateBuilder.CreateArticle instance)
Creates an immutable copy of aCreateBuilder.CreateArticlevalue. 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 CreateArticle instance
-
builder
public static ImmutableCreateArticle.Builder builder()
Creates a builder forImmutableCreateArticle.ImmutableCreateArticle.builder() .parentId(String | null) // nullableparentId.name(String) // requiredname.order(Integer | null) // nullableorder.build();- Returns:
- A new ImmutableCreateArticle builder
-
-