Class ImmutableProgressState
java.lang.Object
com.riadalabs.jira.plugins.insight.services.progress.model.ProgressState
com.riadalabs.jira.plugins.insight.services.progress.model.ImmutableProgressState
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableProgressState
extends ProgressState
Immutable implementation of
ProgressState.
Use the builder to create immutable instances:
ImmutableProgressState.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProgressState. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProgressState.static ImmutableProgressStatecopyOf(ProgressState instance) Creates an immutable copy of aProgressStatevalue.ended()booleanThis instance is equal to all instances ofImmutableProgressStatethat have equal attribute values.inthashCode()Computes a hash code from attributes:progressId,started,ended,result.result()started()toString()Prints the immutable valueProgressStatewith attribute values.final ImmutableProgressStateCopy the current immutable object by setting a present value for the optionalendedattribute.final ImmutableProgressStateCopy the current immutable object by setting an optional value for theendedattribute.final ImmutableProgressStatewithProgressId(ProgressId value) Copy the current immutable object by setting a value for theprogressIdattribute.final ImmutableProgressStatewithResult(Result value) Copy the current immutable object by setting a value for theresultattribute.final ImmutableProgressStatewithStarted(Instant value) Copy the current immutable object by setting a value for thestartedattribute.
-
Method Details
-
progressId
- Specified by:
progressIdin classProgressState- Returns:
- The value of the
progressIdattribute
-
started
- Specified by:
startedin classProgressState- Returns:
- The value of the
startedattribute
-
ended
- Specified by:
endedin classProgressState- Returns:
- The value of the
endedattribute
-
result
- Specified by:
resultin classProgressState- Returns:
- The value of the
resultattribute
-
withProgressId
Copy the current immutable object by setting a value for theprogressIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for progressId- Returns:
- A modified copy of the
thisobject
-
withStarted
Copy the current immutable object by setting a value for thestartedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for started- Returns:
- A modified copy of the
thisobject
-
withEnded
Copy the current immutable object by setting a present value for the optionalendedattribute.- Parameters:
value- The value for ended- Returns:
- A modified copy of
thisobject
-
withEnded
Copy the current immutable object by setting an optional value for theendedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ended- Returns:
- A modified copy of
thisobject
-
withResult
Copy the current immutable object by setting a value for theresultattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for result- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProgressStatethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:progressId,started,ended,result. -
toString
Prints the immutable valueProgressStatewith attribute values. -
copyOf
Creates an immutable copy of aProgressStatevalue. 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 ProgressState instance
-
builder
Creates a builder forImmutableProgressState.ImmutableProgressState.builder() .progressId(com.riadalabs.jira.plugins.insight.services.progress.model.ProgressId) // requiredprogressId.started(java.time.Instant) // requiredstarted.ended(java.time.Instant) // optionalended.result(com.riadalabs.jira.plugins.insight.services.progress.model.Result) // requiredresult.build();- Returns:
- A new ImmutableProgressState builder
-