Class ImmutableDataSetDto
- java.lang.Object
-
- com.chutneytesting.component.dataset.api.ImmutableDataSetDto
-
- All Implemented Interfaces:
DataSetDto
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDataSetDto extends Object implements DataSetDto
Immutable implementation ofDataSetDto.Use the builder to create immutable instances:
ImmutableDataSetDto.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDataSetDto.BuilderBuilds instances of typeImmutableDataSetDto.
-
Field Summary
-
Fields inherited from interface com.chutneytesting.component.dataset.api.DataSetDto
dataSetComparator
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDataSetDto.Builderbuilder()Creates a builder forImmutableDataSetDto.List<KeyValue>constants()static ImmutableDataSetDtocopyOf(DataSetDto instance)Creates an immutable copy of aDataSetDtovalue.List<List<KeyValue>>datatable()Stringdescription()booleanequals(Object another)This instance is equal to all instances ofImmutableDataSetDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name,version,description,lastUpdated,tags,constants,datatable.Optional<String>id()InstantlastUpdated()Stringname()List<String>tags()StringtoString()Prints the immutable valueDataSetDtowith attribute values.Integerversion()ImmutableDataSetDtowithConstants(KeyValue... elements)Copy the current immutable object with elements that replace the content ofconstants.ImmutableDataSetDtowithConstants(Iterable<? extends KeyValue> elements)Copy the current immutable object with elements that replace the content ofconstants.ImmutableDataSetDtowithDatatable(Iterable<? extends List<KeyValue>> elements)Copy the current immutable object with elements that replace the content ofdatatable.ImmutableDataSetDtowithDatatable(List<KeyValue>... elements)Copy the current immutable object with elements that replace the content ofdatatable.ImmutableDataSetDtowithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableDataSetDtowithId(String value)Copy the current immutable object by setting a present value for the optionalidattribute.ImmutableDataSetDtowithId(Optional<String> optional)Copy the current immutable object by setting an optional value for theidattribute.ImmutableDataSetDtowithLastUpdated(Instant value)Copy the current immutable object by setting a value for thelastUpdatedattribute.ImmutableDataSetDtowithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableDataSetDtowithTags(Iterable<String> elements)Copy the current immutable object with elements that replace the content oftags.ImmutableDataSetDtowithTags(String... elements)Copy the current immutable object with elements that replace the content oftags.ImmutableDataSetDtowithVersion(Integer value)Copy the current immutable object by setting a value for theversionattribute.
-
-
-
Method Detail
-
id
public Optional<String> id()
- Specified by:
idin interfaceDataSetDto- Returns:
- The value of the
idattribute
-
name
public String name()
- Specified by:
namein interfaceDataSetDto- Returns:
- The value of the
nameattribute
-
version
public Integer version()
- Specified by:
versionin interfaceDataSetDto- Returns:
- The value of the
versionattribute
-
description
public String description()
- Specified by:
descriptionin interfaceDataSetDto- Returns:
- The value of the
descriptionattribute
-
lastUpdated
public Instant lastUpdated()
- Specified by:
lastUpdatedin interfaceDataSetDto- Returns:
- The value of the
lastUpdatedattribute
-
tags
public List<String> tags()
- Specified by:
tagsin interfaceDataSetDto- Returns:
- The value of the
tagsattribute
-
constants
public List<KeyValue> constants()
- Specified by:
constantsin interfaceDataSetDto- Returns:
- The value of the
constantsattribute
-
datatable
public List<List<KeyValue>> datatable()
- Specified by:
datatablein interfaceDataSetDto- Returns:
- The value of the
datatableattribute
-
withId
public final ImmutableDataSetDto withId(String value)
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy of
thisobject
-
withId
public final ImmutableDataSetDto withId(Optional<String> optional)
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for id- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutableDataSetDto withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withVersion
public final ImmutableDataSetDto withVersion(Integer value)
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableDataSetDto withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withLastUpdated
public final ImmutableDataSetDto withLastUpdated(Instant value)
Copy the current immutable object by setting a value for thelastUpdatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lastUpdated- Returns:
- A modified copy of the
thisobject
-
withTags
public final ImmutableDataSetDto withTags(String... elements)
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
public final ImmutableDataSetDto withTags(Iterable<String> elements)
Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy of
thisobject
-
withConstants
public final ImmutableDataSetDto withConstants(KeyValue... elements)
Copy the current immutable object with elements that replace the content ofconstants.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withConstants
public final ImmutableDataSetDto withConstants(Iterable<? extends KeyValue> elements)
Copy the current immutable object with elements that replace the content ofconstants. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of constants elements to set- Returns:
- A modified copy of
thisobject
-
withDatatable
@SafeVarargs public final ImmutableDataSetDto withDatatable(List<KeyValue>... elements)
Copy the current immutable object with elements that replace the content ofdatatable.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDatatable
public final ImmutableDataSetDto withDatatable(Iterable<? extends List<KeyValue>> elements)
Copy the current immutable object with elements that replace the content ofdatatable. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of datatable elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDataSetDtothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,name,version,description,lastUpdated,tags,constants,datatable.
-
toString
public String toString()
Prints the immutable valueDataSetDtowith attribute values.
-
copyOf
public static ImmutableDataSetDto copyOf(DataSetDto instance)
Creates an immutable copy of aDataSetDtovalue. 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 DataSetDto instance
-
builder
public static ImmutableDataSetDto.Builder builder()
Creates a builder forImmutableDataSetDto.ImmutableDataSetDto.builder() .id(String) // optionalid.name(String) // requiredname.version(Integer) // optionalversion.description(String) // optionaldescription.lastUpdated(java.time.Instant) // optionallastUpdated.addTags|addAllTags(String) //tagselements .addConstants|addAllConstants(com.chutneytesting.server.core.domain.tools.ui.KeyValue) //constantselements .addDatatable|addAllDatatable(List<com.chutneytesting.server.core.domain.tools.ui.KeyValue>) //datatableelements .build();- Returns:
- A new ImmutableDataSetDto builder
-
-