Class ImmutableRunningScenarioState
java.lang.Object
fr.enedis.chutney.server.core.domain.execution.state.ImmutableRunningScenarioState
- All Implemented Interfaces:
RunningScenarioState
@Generated(from="RunningScenarioState",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableRunningScenarioState
extends Object
implements RunningScenarioState
Immutable implementation of
RunningScenarioState.
Use the builder to create immutable instances:
ImmutableRunningScenarioState.builder().
Use the static factory method to create immutable instances:
ImmutableRunningScenarioState.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRunningScenarioState. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRunningScenarioState.copyOf(RunningScenarioState instance) Creates an immutable copy of aRunningScenarioStatevalue.booleanThis instance is equal to all instances ofImmutableRunningScenarioStatethat have equal attribute values.inthashCode()Computes a hash code from attributes:scenarioId,startTime.Construct a new immutableRunningScenarioStateinstance.toString()Prints the immutable valueRunningScenarioStatewith attribute values.withScenarioId(String value) Copy the current immutable object by setting a value for thescenarioIdattribute.
-
Method Details
-
scenarioId
- Specified by:
scenarioIdin interfaceRunningScenarioState- Returns:
- The value of the
scenarioIdattribute
-
startTime
- Specified by:
startTimein interfaceRunningScenarioState- Returns:
- The computed-at-construction value of the
startTimeattribute
-
withScenarioId
Copy the current immutable object by setting a value for thescenarioIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scenarioId- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableRunningScenarioStatethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:scenarioId,startTime. -
toString
Prints the immutable valueRunningScenarioStatewith attribute values. -
of
Construct a new immutableRunningScenarioStateinstance.- Parameters:
scenarioId- The value for thescenarioIdattribute- Returns:
- An immutable RunningScenarioState instance
-
copyOf
Creates an immutable copy of aRunningScenarioStatevalue. 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 RunningScenarioState instance
-
builder
Creates a builder forImmutableRunningScenarioState.ImmutableRunningScenarioState.builder() .scenarioId(String) // requiredscenarioId.build();- Returns:
- A new ImmutableRunningScenarioState builder
-