Package io.dialob.api.questionnaire
Class ImmutableQuestionnaireListItem
- java.lang.Object
-
- io.dialob.api.questionnaire.ImmutableQuestionnaireListItem
-
- All Implemented Interfaces:
QuestionnaireListItem,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableQuestionnaireListItem extends Object implements QuestionnaireListItem
Immutable implementation ofQuestionnaireListItem.Use the builder to create immutable instances:
ImmutableQuestionnaireListItem.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableQuestionnaireListItem.BuilderBuilds instances of typeImmutableQuestionnaireListItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableQuestionnaireListItem.Builderbuilder()Creates a builder forImmutableQuestionnaireListItem.static ImmutableQuestionnaireListItemcopyOf(QuestionnaireListItem instance)Creates an immutable copy of aQuestionnaireListItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableQuestionnaireListItemthat have equal attribute values.StringgetId()Questionnaire.MetadatagetMetadata()inthashCode()Computes a hash code from attributes:id,metadata.StringtoString()Prints the immutable valueQuestionnaireListItemwith attribute values.ImmutableQuestionnaireListItemwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableQuestionnaireListItemwithMetadata(Questionnaire.Metadata value)Copy the current immutable object by setting a value for themetadataattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceQuestionnaireListItem- Returns:
- The value of the
idattribute
-
getMetadata
public Questionnaire.Metadata getMetadata()
- Specified by:
getMetadatain interfaceQuestionnaireListItem- Returns:
- The value of the
metadataattribute
-
withId
public final ImmutableQuestionnaireListItem withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withMetadata
public final ImmutableQuestionnaireListItem withMetadata(Questionnaire.Metadata value)
Copy the current immutable object by setting a value for themetadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for metadata- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableQuestionnaireListItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,metadata.
-
toString
public String toString()
Prints the immutable valueQuestionnaireListItemwith attribute values.
-
copyOf
public static ImmutableQuestionnaireListItem copyOf(QuestionnaireListItem instance)
Creates an immutable copy of aQuestionnaireListItemvalue. 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 QuestionnaireListItem instance
-
builder
public static ImmutableQuestionnaireListItem.Builder builder()
Creates a builder forImmutableQuestionnaireListItem.ImmutableQuestionnaireListItem.builder() .id(String) // requiredid.metadata(io.dialob.api.questionnaire.Questionnaire.Metadata) // requiredmetadata.build();- Returns:
- A new ImmutableQuestionnaireListItem builder
-
-