Package io.riada.insight.model
Class ImmutableTicketContext
java.lang.Object
io.riada.insight.model.TicketContext
io.riada.insight.model.ImmutableTicketContext
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTicketContext
extends TicketContext
Immutable implementation of
TicketContext
.
Use the builder to create immutable instances:
ImmutableTicketContext.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableTicketContext
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTicketContext
.static ImmutableTicketContext
copyOf
(TicketContext instance) Creates an immutable copy of aTicketContext
value.boolean
This instance is equal to all instances ofImmutableTicketContext
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:currentReporter
,currentAssignee
,currentProjectId
.toString()
Prints the immutable valueTicketContext
with attribute values.final ImmutableTicketContext
withCurrentAssignee
(InsightUser value) Copy the current immutable object by setting a present value for the optionalcurrentAssignee
attribute.final ImmutableTicketContext
withCurrentAssignee
(Optional<? extends InsightUser> optional) Copy the current immutable object by setting an optional value for thecurrentAssignee
attribute.final ImmutableTicketContext
withCurrentProjectId
(long value) Copy the current immutable object by setting a present value for the optionalcurrentProjectId
attribute.final ImmutableTicketContext
withCurrentProjectId
(OptionalLong optional) Copy the current immutable object by setting an optional value for thecurrentProjectId
attribute.final ImmutableTicketContext
withCurrentReporter
(InsightUser value) Copy the current immutable object by setting a present value for the optionalcurrentReporter
attribute.final ImmutableTicketContext
withCurrentReporter
(Optional<? extends InsightUser> optional) Copy the current immutable object by setting an optional value for thecurrentReporter
attribute.
-
Method Details
-
currentReporter
- Specified by:
currentReporter
in classTicketContext
- Returns:
- The value of the
currentReporter
attribute
-
currentAssignee
- Specified by:
currentAssignee
in classTicketContext
- Returns:
- The value of the
currentAssignee
attribute
-
currentProjectId
- Specified by:
currentProjectId
in classTicketContext
- Returns:
- The value of the
currentProjectId
attribute
-
withCurrentReporter
Copy the current immutable object by setting a present value for the optionalcurrentReporter
attribute.- Parameters:
value
- The value for currentReporter- Returns:
- A modified copy of
this
object
-
withCurrentReporter
Copy the current immutable object by setting an optional value for thecurrentReporter
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 currentReporter- Returns:
- A modified copy of
this
object
-
withCurrentAssignee
Copy the current immutable object by setting a present value for the optionalcurrentAssignee
attribute.- Parameters:
value
- The value for currentAssignee- Returns:
- A modified copy of
this
object
-
withCurrentAssignee
Copy the current immutable object by setting an optional value for thecurrentAssignee
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 currentAssignee- Returns:
- A modified copy of
this
object
-
withCurrentProjectId
Copy the current immutable object by setting a present value for the optionalcurrentProjectId
attribute.- Parameters:
value
- The value for currentProjectId- Returns:
- A modified copy of
this
object
-
withCurrentProjectId
Copy the current immutable object by setting an optional value for thecurrentProjectId
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for currentProjectId- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableTicketContext
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:currentReporter
,currentAssignee
,currentProjectId
. -
toString
Prints the immutable valueTicketContext
with attribute values. -
copyOf
Creates an immutable copy of aTicketContext
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 TicketContext instance
-
builder
Creates a builder forImmutableTicketContext
.ImmutableTicketContext.builder() .setCurrentReporter(io.riada.insight.model.InsightUser) // optional
currentReporter
.setCurrentAssignee(io.riada.insight.model.InsightUser) // optionalcurrentAssignee
.setCurrentProjectId(long) // optionalcurrentProjectId
.build();- Returns:
- A new ImmutableTicketContext builder
-