Package io.thestencil.client.api
Class ImmutableVersionInfo
- java.lang.Object
-
- io.thestencil.client.api.ImmutableVersionInfo
-
- All Implemented Interfaces:
StencilClient.VersionInfo
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableVersionInfo extends Object implements StencilClient.VersionInfo
Immutable implementation ofStencilClient.VersionInfo.Use the builder to create immutable instances:
ImmutableVersionInfo.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableVersionInfo.BuilderBuilds instances of typeImmutableVersionInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableVersionInfo.Builderbuilder()Creates a builder forImmutableVersionInfo.static ImmutableVersionInfocopyOf(StencilClient.VersionInfo instance)Creates an immutable copy of aStencilClient.VersionInfovalue.booleanequals(Object another)This instance is equal to all instances ofImmutableVersionInfothat have equal attribute values.StringgetDate()StringgetVersion()inthashCode()Computes a hash code from attributes:version,date.StringtoString()Prints the immutable valueVersionInfowith attribute values.ImmutableVersionInfowithDate(String value)Copy the current immutable object by setting a value for thedateattribute.ImmutableVersionInfowithVersion(String value)Copy the current immutable object by setting a value for theversionattribute.
-
-
-
Method Detail
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceStencilClient.VersionInfo- Returns:
- The value of the
versionattribute
-
getDate
public String getDate()
- Specified by:
getDatein interfaceStencilClient.VersionInfo- Returns:
- The value of the
dateattribute
-
withVersion
public final ImmutableVersionInfo withVersion(String value)
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withDate
public final ImmutableVersionInfo withDate(String value)
Copy the current immutable object by setting a value for thedateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for date- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableVersionInfothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:version,date.
-
toString
public String toString()
Prints the immutable valueVersionInfowith attribute values.
-
copyOf
public static ImmutableVersionInfo copyOf(StencilClient.VersionInfo instance)
Creates an immutable copy of aStencilClient.VersionInfovalue. 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 VersionInfo instance
-
builder
public static ImmutableVersionInfo.Builder builder()
Creates a builder forImmutableVersionInfo.ImmutableVersionInfo.builder() .version(String) // requiredversion.date(String) // requireddate.build();- Returns:
- A new ImmutableVersionInfo builder
-
-