Class ImmutableExecutionHistory
- java.lang.Object
-
- com.chutneytesting.server.core.domain.execution.history.ImmutableExecutionHistory
-
- All Implemented Interfaces:
ExecutionHistory
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableExecutionHistory extends Object implements ExecutionHistory
Immutable implementation ofExecutionHistory.Use the builder to create immutable instances:
ImmutableExecutionHistory.builder(). Use the static factory method to create immutable instances:ImmutableExecutionHistory.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableExecutionHistory.BuilderBuilds instances of typeImmutableExecutionHistory.static classImmutableExecutionHistory.DetachedExecutionImmutable implementation ofExecutionHistory.DetachedExecution.static classImmutableExecutionHistory.ExecutionImmutable implementation ofExecutionHistory.Execution.static classImmutableExecutionHistory.ExecutionSummaryImmutable implementation ofExecutionHistory.ExecutionSummary.-
Nested classes/interfaces inherited from interface com.chutneytesting.server.core.domain.execution.history.ExecutionHistory
ExecutionHistory.Attached, ExecutionHistory.ExecutionProperties
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableExecutionHistory.Builderbuilder()Creates a builder forImmutableExecutionHistory.static ImmutableExecutionHistorycopyOf(ExecutionHistory instance)Creates an immutable copy of aExecutionHistoryvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableExecutionHistorythat have equal attribute values.inthashCode()Computes a hash code from attributes:scenarioId,history.com.google.common.collect.ImmutableList<ExecutionHistory.Execution>history()static ImmutableExecutionHistoryof(String scenarioId, Iterable<? extends ExecutionHistory.Execution> history)Construct a new immutableExecutionHistoryinstance.static ImmutableExecutionHistoryof(String scenarioId, List<ExecutionHistory.Execution> history)Construct a new immutableExecutionHistoryinstance.StringscenarioId()StringtoString()Prints the immutable valueExecutionHistorywith attribute values.ImmutableExecutionHistorywithHistory(ExecutionHistory.Execution... elements)Copy the current immutable object with elements that replace the content ofhistory.ImmutableExecutionHistorywithHistory(Iterable<? extends ExecutionHistory.Execution> elements)Copy the current immutable object with elements that replace the content ofhistory.ImmutableExecutionHistorywithScenarioId(String value)Copy the current immutable object by setting a value for thescenarioIdattribute.
-
-
-
Method Detail
-
scenarioId
public String scenarioId()
- Specified by:
scenarioIdin interfaceExecutionHistory- Returns:
- The value of the
scenarioIdattribute
-
history
public com.google.common.collect.ImmutableList<ExecutionHistory.Execution> history()
- Specified by:
historyin interfaceExecutionHistory- Returns:
- The value of the
historyattribute
-
withScenarioId
public final ImmutableExecutionHistory 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
-
withHistory
public final ImmutableExecutionHistory withHistory(ExecutionHistory.Execution... elements)
Copy the current immutable object with elements that replace the content ofhistory.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHistory
public final ImmutableExecutionHistory withHistory(Iterable<? extends ExecutionHistory.Execution> elements)
Copy the current immutable object with elements that replace the content ofhistory. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of history elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableExecutionHistorythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:scenarioId,history.
-
toString
public String toString()
Prints the immutable valueExecutionHistorywith attribute values.
-
of
public static ImmutableExecutionHistory of(String scenarioId, List<ExecutionHistory.Execution> history)
Construct a new immutableExecutionHistoryinstance.- Parameters:
scenarioId- The value for thescenarioIdattributehistory- The value for thehistoryattribute- Returns:
- An immutable ExecutionHistory instance
-
of
public static ImmutableExecutionHistory of(String scenarioId, Iterable<? extends ExecutionHistory.Execution> history)
Construct a new immutableExecutionHistoryinstance.- Parameters:
scenarioId- The value for thescenarioIdattributehistory- The value for thehistoryattribute- Returns:
- An immutable ExecutionHistory instance
-
copyOf
public static ImmutableExecutionHistory copyOf(ExecutionHistory instance)
Creates an immutable copy of aExecutionHistoryvalue. 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 ExecutionHistory instance
-
builder
public static ImmutableExecutionHistory.Builder builder()
Creates a builder forImmutableExecutionHistory.ImmutableExecutionHistory.builder() .scenarioId(String) // requiredscenarioId.addHistory|addAllHistory(com.chutneytesting.server.core.domain.execution.history.ExecutionHistory.Execution) //historyelements .build();- Returns:
- A new ImmutableExecutionHistory builder
-
-