Package com.io7m.coffeepick.runtime
Class RuntimeBuild
java.lang.Object
com.io7m.coffeepick.runtime.RuntimeBuild
- All Implemented Interfaces:
RuntimeBuildType
public final class RuntimeBuild extends java.lang.Object implements RuntimeBuildType
Build information.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeBuild.Builder
Builds instances of typeRuntimeBuild
. -
Method Summary
Modifier and Type Method Description static RuntimeBuild.Builder
builder()
Creates a builder forRuntimeBuild
.java.lang.String
buildNumber()
static RuntimeBuild
copyOf(RuntimeBuildType instance)
Creates an immutable copy of aRuntimeBuildType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeBuild
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:buildNumber
,time
.java.time.OffsetDateTime
time()
java.lang.String
toString()
Prints the immutable valueRuntimeBuild
with attribute values.RuntimeBuild
withBuildNumber(java.lang.String value)
Copy the current immutable object by setting a value for thebuildNumber
attribute.RuntimeBuild
withTime(java.time.OffsetDateTime value)
Copy the current immutable object by setting a value for thetime
attribute.
-
Method Details
-
buildNumber
public java.lang.String buildNumber()- Specified by:
buildNumber
in interfaceRuntimeBuildType
- Returns:
- The build number
-
time
public java.time.OffsetDateTime time()- Specified by:
time
in interfaceRuntimeBuildType
- Returns:
- The build time
-
withBuildNumber
Copy the current immutable object by setting a value for thebuildNumber
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for buildNumber- Returns:
- A modified copy of the
this
object
-
withTime
Copy the current immutable object by setting a value for thetime
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for time- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofRuntimeBuild
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:buildNumber
,time
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueRuntimeBuild
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aRuntimeBuildType
value. 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 RuntimeBuild instance
-
builder
Creates a builder forRuntimeBuild
.RuntimeBuild.builder() .setBuildNumber(String) // required
buildNumber
.setTime(java.time.OffsetDateTime) // requiredtime
.build();- Returns:
- A new RuntimeBuild builder
-