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 class
Builds instances of typeImmutableProgressState
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableProgressState
.static ImmutableProgressState
copyOf
(ProgressState instance) Creates an immutable copy of aProgressState
value.ended()
boolean
This instance is equal to all instances ofImmutableProgressState
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:progressId
,started
,ended
,result
.result()
started()
toString()
Prints the immutable valueProgressState
with attribute values.final ImmutableProgressState
Copy the current immutable object by setting a present value for the optionalended
attribute.final ImmutableProgressState
Copy the current immutable object by setting an optional value for theended
attribute.final ImmutableProgressState
withProgressId
(ProgressId value) Copy the current immutable object by setting a value for theprogressId
attribute.final ImmutableProgressState
withResult
(Result value) Copy the current immutable object by setting a value for theresult
attribute.final ImmutableProgressState
withStarted
(Instant value) Copy the current immutable object by setting a value for thestarted
attribute.
-
Method Details
-
progressId
- Specified by:
progressId
in classProgressState
- Returns:
- The value of the
progressId
attribute
-
started
- Specified by:
started
in classProgressState
- Returns:
- The value of the
started
attribute
-
ended
- Specified by:
ended
in classProgressState
- Returns:
- The value of the
ended
attribute
-
result
- Specified by:
result
in classProgressState
- Returns:
- The value of the
result
attribute
-
withProgressId
Copy the current immutable object by setting a value for theprogressId
attribute. 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
this
object
-
withStarted
Copy the current immutable object by setting a value for thestarted
attribute. 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
this
object
-
withEnded
Copy the current immutable object by setting a present value for the optionalended
attribute.- Parameters:
value
- The value for ended- Returns:
- A modified copy of
this
object
-
withEnded
Copy the current immutable object by setting an optional value for theended
attribute. 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
this
object
-
withResult
Copy the current immutable object by setting a value for theresult
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableProgressState
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:progressId
,started
,ended
,result
. -
toString
Prints the immutable valueProgressState
with attribute values. -
copyOf
Creates an immutable copy of aProgressState
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 ProgressState instance
-
builder
Creates a builder forImmutableProgressState
.ImmutableProgressState.builder() .progressId(com.riadalabs.jira.plugins.insight.services.progress.model.ProgressId) // required
progressId
.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
-