Package io.thestencil.staticontent.api
Class ImmutableHeading
- java.lang.Object
-
- io.thestencil.staticontent.api.ImmutableHeading
-
- All Implemented Interfaces:
StaticContentClient.Heading
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableHeading extends Object implements StaticContentClient.Heading
Immutable implementation ofStaticContentClient.Heading.Use the builder to create immutable instances:
ImmutableHeading.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableHeading.BuilderBuilds instances of typeImmutableHeading.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableHeading.Builderbuilder()Creates a builder forImmutableHeading.static ImmutableHeadingcopyOf(StaticContentClient.Heading instance)Creates an immutable copy of aStaticContentClient.Headingvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableHeadingthat have equal attribute values.IntegergetLevel()StringgetName()IntegergetOrder()inthashCode()Computes a hash code from attributes:order,level,name.StringtoString()Prints the immutable valueHeadingwith attribute values.ImmutableHeadingwithLevel(Integer value)Copy the current immutable object by setting a value for thelevelattribute.ImmutableHeadingwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableHeadingwithOrder(Integer value)Copy the current immutable object by setting a value for theorderattribute.
-
-
-
Method Detail
-
getOrder
public Integer getOrder()
- Specified by:
getOrderin interfaceStaticContentClient.Heading- Returns:
- The value of the
orderattribute
-
getLevel
public Integer getLevel()
- Specified by:
getLevelin interfaceStaticContentClient.Heading- Returns:
- The value of the
levelattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceStaticContentClient.Heading- Returns:
- The value of the
nameattribute
-
withOrder
public final ImmutableHeading withOrder(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- Returns:
- A modified copy of the
thisobject
-
withLevel
public final ImmutableHeading withLevel(Integer value)
Copy the current immutable object by setting a value for thelevelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for level- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableHeading 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableHeadingthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:order,level,name.
-
toString
public String toString()
Prints the immutable valueHeadingwith attribute values.
-
copyOf
public static ImmutableHeading copyOf(StaticContentClient.Heading instance)
Creates an immutable copy of aStaticContentClient.Headingvalue. 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 Heading instance
-
builder
public static ImmutableHeading.Builder builder()
Creates a builder forImmutableHeading.ImmutableHeading.builder() .order(Integer) // requiredorder.level(Integer) // requiredlevel.name(String) // requiredname.build();- Returns:
- A new ImmutableHeading builder
-
-