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 classBuilds instances of typeImmutableTicketContext. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTicketContext.static ImmutableTicketContextcopyOf(TicketContext instance) Creates an immutable copy of aTicketContextvalue.booleanThis instance is equal to all instances ofImmutableTicketContextthat have equal attribute values.inthashCode()Computes a hash code from attributes:currentReporter,currentAssignee,currentProjectId.toString()Prints the immutable valueTicketContextwith attribute values.final ImmutableTicketContextwithCurrentAssignee(InsightUser value) Copy the current immutable object by setting a present value for the optionalcurrentAssigneeattribute.final ImmutableTicketContextwithCurrentAssignee(Optional<? extends InsightUser> optional) Copy the current immutable object by setting an optional value for thecurrentAssigneeattribute.final ImmutableTicketContextwithCurrentProjectId(long value) Copy the current immutable object by setting a present value for the optionalcurrentProjectIdattribute.final ImmutableTicketContextwithCurrentProjectId(OptionalLong optional) Copy the current immutable object by setting an optional value for thecurrentProjectIdattribute.final ImmutableTicketContextwithCurrentReporter(InsightUser value) Copy the current immutable object by setting a present value for the optionalcurrentReporterattribute.final ImmutableTicketContextwithCurrentReporter(Optional<? extends InsightUser> optional) Copy the current immutable object by setting an optional value for thecurrentReporterattribute.
-
Method Details
-
currentReporter
- Specified by:
currentReporterin classTicketContext- Returns:
- The value of the
currentReporterattribute
-
currentAssignee
- Specified by:
currentAssigneein classTicketContext- Returns:
- The value of the
currentAssigneeattribute
-
currentProjectId
- Specified by:
currentProjectIdin classTicketContext- Returns:
- The value of the
currentProjectIdattribute
-
withCurrentReporter
Copy the current immutable object by setting a present value for the optionalcurrentReporterattribute.- Parameters:
value- The value for currentReporter- Returns:
- A modified copy of
thisobject
-
withCurrentReporter
Copy the current immutable object by setting an optional value for thecurrentReporterattribute. 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
thisobject
-
withCurrentAssignee
Copy the current immutable object by setting a present value for the optionalcurrentAssigneeattribute.- Parameters:
value- The value for currentAssignee- Returns:
- A modified copy of
thisobject
-
withCurrentAssignee
Copy the current immutable object by setting an optional value for thecurrentAssigneeattribute. 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
thisobject
-
withCurrentProjectId
Copy the current immutable object by setting a present value for the optionalcurrentProjectIdattribute.- Parameters:
value- The value for currentProjectId- Returns:
- A modified copy of
thisobject
-
withCurrentProjectId
Copy the current immutable object by setting an optional value for thecurrentProjectIdattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableTicketContextthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:currentReporter,currentAssignee,currentProjectId. -
toString
Prints the immutable valueTicketContextwith attribute values. -
copyOf
Creates an immutable copy of aTicketContextvalue. 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) // optionalcurrentReporter.setCurrentAssignee(io.riada.insight.model.InsightUser) // optionalcurrentAssignee.setCurrentProjectId(long) // optionalcurrentProjectId.build();- Returns:
- A new ImmutableTicketContext builder
-