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 classRuntimeBuild.BuilderBuilds instances of typeRuntimeBuild.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RuntimeBuild.Builderbuilder()Creates a builder forRuntimeBuild.java.lang.StringbuildNumber()static RuntimeBuildcopyOf(RuntimeBuildType instance)Creates an immutable copy of aRuntimeBuildTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofRuntimeBuildthat have equal attribute values.inthashCode()Computes a hash code from attributes:buildNumber,time.java.time.OffsetDateTimetime()java.lang.StringtoString()Prints the immutable valueRuntimeBuildwith attribute values.RuntimeBuildwithBuildNumber(java.lang.String value)Copy the current immutable object by setting a value for thebuildNumberattribute.RuntimeBuildwithTime(java.time.OffsetDateTime value)Copy the current immutable object by setting a value for thetimeattribute.
-
-
-
Method Detail
-
buildNumber
public java.lang.String buildNumber()
- Specified by:
buildNumberin interfaceRuntimeBuildType- Returns:
- The build number
-
time
public java.time.OffsetDateTime time()
- Specified by:
timein interfaceRuntimeBuildType- Returns:
- The build time
-
withBuildNumber
public final RuntimeBuild withBuildNumber(java.lang.String value)
Copy the current immutable object by setting a value for thebuildNumberattribute. 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
thisobject
-
withTime
public final RuntimeBuild withTime(java.time.OffsetDateTime value)
Copy the current immutable object by setting a value for thetimeattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeBuildthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:buildNumber,time.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRuntimeBuildwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static RuntimeBuild copyOf(RuntimeBuildType instance)
Creates an immutable copy of aRuntimeBuildTypevalue. 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
public static RuntimeBuild.Builder builder()
Creates a builder forRuntimeBuild.RuntimeBuild.builder() .setBuildNumber(String) // requiredbuildNumber.setTime(java.time.OffsetDateTime) // requiredtime.build();- Returns:
- A new RuntimeBuild builder
-
-