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 of
QuestionnaireListItem.
Use the builder to create immutable instances:
ImmutableQuestionnaireListItem.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableQuestionnaireListItem. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableQuestionnaireListItem.copyOf(QuestionnaireListItem instance) Creates an immutable copy of aQuestionnaireListItemvalue.booleanThis instance is equal to all instances ofImmutableQuestionnaireListItemthat have equal attribute values.getId()inthashCode()Computes a hash code from attributes:id,metadata.toString()Prints the immutable valueQuestionnaireListItemwith attribute values.Copy the current immutable object by setting a value for theidattribute.Copy the current immutable object by setting a value for themetadataattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceQuestionnaireListItem- Returns:
- The value of the
idattribute
-
getMetadata
- Specified by:
getMetadatain interfaceQuestionnaireListItem- Returns:
- The value of the
metadataattribute
-
withId
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
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
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
Prints the immutable valueQuestionnaireListItemwith attribute values. -
copyOf
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
Creates a builder forImmutableQuestionnaireListItem.ImmutableQuestionnaireListItem.builder() .id(String) // requiredid.metadata(io.dialob.api.questionnaire.Questionnaire.Metadata) // requiredmetadata.build();- Returns:
- A new ImmutableQuestionnaireListItem builder
-