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 classRuntimeRepositoryEventUpdateRunning.BuilderBuilds instances of typeRuntimeRepositoryEventUpdateRunning.-
Nested classes/interfaces inherited from interface com.io7m.coffeepick.repository.spi.RuntimeRepositoryEventUpdateType
RuntimeRepositoryEventUpdateType.Kind
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RuntimeRepositoryEventUpdateRunning.Builderbuilder()Creates a builder forRuntimeRepositoryEventUpdateRunning.static RuntimeRepositoryEventUpdateRunningcopyOf(RuntimeRepositoryEventUpdateRunningType instance)Creates an immutable copy of aRuntimeRepositoryEventUpdateRunningTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryEventUpdateRunningthat have equal attribute values.inthashCode()Computes a hash code from attributes:repository,progress.doubleprogress()java.net.URIrepository()java.lang.StringtoString()Prints the immutable valueRuntimeRepositoryEventUpdateRunningwith attribute values.RuntimeRepositoryEventUpdateRunningwithProgress(double value)Copy the current immutable object by setting a value for theprogressattribute.RuntimeRepositoryEventUpdateRunningwithRepository(java.net.URI value)Copy the current immutable object by setting a value for therepositoryattribute.-
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 Detail
-
repository
public java.net.URI repository()
- Specified by:
repositoryin interfaceRuntimeRepositoryEventType- Specified by:
repositoryin interfaceRuntimeRepositoryEventUpdateRunningType- Specified by:
repositoryin interfaceRuntimeRepositoryEventUpdateType- Returns:
- The value of the
repositoryattribute
-
progress
public double progress()
- Specified by:
progressin interfaceRuntimeRepositoryEventUpdateRunningType- Returns:
- The update progress in the range [0, 1]
-
withRepository
public final RuntimeRepositoryEventUpdateRunning withRepository(java.net.URI value)
Copy the current immutable object by setting a value for therepositoryattribute. 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
thisobject
-
withProgress
public final RuntimeRepositoryEventUpdateRunning withProgress(double value)
Copy the current immutable object by setting a value for theprogressattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeRepositoryEventUpdateRunningthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,progress.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRuntimeRepositoryEventUpdateRunningwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static RuntimeRepositoryEventUpdateRunning copyOf(RuntimeRepositoryEventUpdateRunningType instance)
Creates an immutable copy of aRuntimeRepositoryEventUpdateRunningTypevalue. 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
public static RuntimeRepositoryEventUpdateRunning.Builder builder()
Creates a builder forRuntimeRepositoryEventUpdateRunning.RuntimeRepositoryEventUpdateRunning.builder() .setRepository(java.net.URI) // requiredrepository.setProgress(double) // requiredprogress.build();- Returns:
- A new RuntimeRepositoryEventUpdateRunning builder
-
-