Class ImmutableRunningScenarioState
- java.lang.Object
-
- com.chutneytesting.server.core.domain.execution.state.ImmutableRunningScenarioState
-
- All Implemented Interfaces:
RunningScenarioState
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRunningScenarioState extends Object implements RunningScenarioState
Immutable implementation ofRunningScenarioState.Use the builder to create immutable instances:
ImmutableRunningScenarioState.builder(). Use the static factory method to create immutable instances:ImmutableRunningScenarioState.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRunningScenarioState.BuilderBuilds instances of typeImmutableRunningScenarioState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRunningScenarioState.Builderbuilder()Creates a builder forImmutableRunningScenarioState.static ImmutableRunningScenarioStatecopyOf(RunningScenarioState instance)Creates an immutable copy of aRunningScenarioStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRunningScenarioStatethat have equal attribute values.inthashCode()Computes a hash code from attributes:scenarioId,startTime.static ImmutableRunningScenarioStateof(String scenarioId)Construct a new immutableRunningScenarioStateinstance.StringscenarioId()InstantstartTime()StringtoString()Prints the immutable valueRunningScenarioStatewith attribute values.ImmutableRunningScenarioStatewithScenarioId(String value)Copy the current immutable object by setting a value for thescenarioIdattribute.
-
-
-
Method Detail
-
scenarioId
public String scenarioId()
- Specified by:
scenarioIdin interfaceRunningScenarioState- Returns:
- The value of the
scenarioIdattribute
-
startTime
public Instant startTime()
- Specified by:
startTimein interfaceRunningScenarioState- Returns:
- The computed-at-construction value of the
startTimeattribute
-
withScenarioId
public final ImmutableRunningScenarioState withScenarioId(String value)
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 of the
thisobject
-
equals
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueRunningScenarioStatewith attribute values.
-
of
public static ImmutableRunningScenarioState of(String scenarioId)
Construct a new immutableRunningScenarioStateinstance.- Parameters:
scenarioId- The value for thescenarioIdattribute- Returns:
- An immutable RunningScenarioState instance
-
copyOf
public static ImmutableRunningScenarioState copyOf(RunningScenarioState instance)
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
public static ImmutableRunningScenarioState.Builder builder()
Creates a builder forImmutableRunningScenarioState.ImmutableRunningScenarioState.builder() .scenarioId(String) // requiredscenarioId.build();- Returns:
- A new ImmutableRunningScenarioState builder
-
-