Class RuntimeRepositoryEventUpdateRunning
java.lang.Object
com.io7m.coffeepick.repository.spi.RuntimeRepositoryEventUpdateRunning
- All Implemented Interfaces:
RuntimeRepositoryEventType
,RuntimeRepositoryEventUpdateRunningType
,RuntimeRepositoryEventUpdateType
public final class RuntimeRepositoryEventUpdateRunning extends java.lang.Object implements RuntimeRepositoryEventUpdateRunningType
A repository update is running.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeRepositoryEventUpdateRunning.Builder
Builds instances of typeRuntimeRepositoryEventUpdateRunning
.Nested classes/interfaces inherited from interface com.io7m.coffeepick.repository.spi.RuntimeRepositoryEventUpdateType
RuntimeRepositoryEventUpdateType.Kind
-
Method Summary
Modifier and Type Method Description static RuntimeRepositoryEventUpdateRunning.Builder
builder()
Creates a builder forRuntimeRepositoryEventUpdateRunning
.static RuntimeRepositoryEventUpdateRunning
copyOf(RuntimeRepositoryEventUpdateRunningType instance)
Creates an immutable copy of aRuntimeRepositoryEventUpdateRunningType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeRepositoryEventUpdateRunning
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:repository
,progress
.double
progress()
java.net.URI
repository()
java.lang.String
toString()
Prints the immutable valueRuntimeRepositoryEventUpdateRunning
with attribute values.RuntimeRepositoryEventUpdateRunning
withProgress(double value)
Copy the current immutable object by setting a value for theprogress
attribute.RuntimeRepositoryEventUpdateRunning
withRepository(java.net.URI value)
Copy the current immutable object by setting a value for therepository
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.coffeepick.repository.spi.RuntimeRepositoryEventUpdateRunningType
kind
-
Method Details
-
repository
public java.net.URI repository()- Specified by:
repository
in interfaceRuntimeRepositoryEventType
- Specified by:
repository
in interfaceRuntimeRepositoryEventUpdateRunningType
- Specified by:
repository
in interfaceRuntimeRepositoryEventUpdateType
- Returns:
- The value of the
repository
attribute
-
progress
public double progress()- Specified by:
progress
in interfaceRuntimeRepositoryEventUpdateRunningType
- Returns:
- The update progress in the range [0, 1]
-
withRepository
Copy the current immutable object by setting a value for therepository
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repository- Returns:
- A modified copy of the
this
object
-
withProgress
Copy the current immutable object by setting a value for theprogress
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for progress- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryEventUpdateRunning
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:repository
,progress
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueRuntimeRepositoryEventUpdateRunning
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
public static RuntimeRepositoryEventUpdateRunning copyOf(RuntimeRepositoryEventUpdateRunningType instance)Creates an immutable copy of aRuntimeRepositoryEventUpdateRunningType
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 RuntimeRepositoryEventUpdateRunning instance
-
builder
Creates a builder forRuntimeRepositoryEventUpdateRunning
.RuntimeRepositoryEventUpdateRunning.builder() .setRepository(java.net.URI) // required
repository
.setProgress(double) // requiredprogress
.build();- Returns:
- A new RuntimeRepositoryEventUpdateRunning builder
-