Package io.dialob.form.service.api
Class ImmutableFormMetadataRow
- java.lang.Object
-
- io.dialob.form.service.api.ImmutableFormMetadataRow
-
- All Implemented Interfaces:
FormDatabase.FormMetadataRow
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFormMetadataRow extends Object implements FormDatabase.FormMetadataRow
Immutable implementation ofFormDatabase.FormMetadataRow.Use the builder to create immutable instances:
ImmutableFormMetadataRow.builder(). Use the static factory method to create immutable instances:ImmutableFormMetadataRow.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFormMetadataRow.BuilderBuilds instances of typeImmutableFormMetadataRow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFormMetadataRow.Builderbuilder()Creates a builder forImmutableFormMetadataRow.static ImmutableFormMetadataRowcopyOf(FormDatabase.FormMetadataRow instance)Creates an immutable copy of aFormDatabase.FormMetadataRowvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFormMetadataRowthat have equal attribute values.StringgetId()io.dialob.api.form.Form.MetadatagetValue()inthashCode()Computes a hash code from attributes:id,value.static ImmutableFormMetadataRowof(String id, io.dialob.api.form.Form.Metadata value)Construct a new immutableFormMetadataRowinstance.StringtoString()Prints the immutable valueFormMetadataRowwith attribute values.ImmutableFormMetadataRowwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableFormMetadataRowwithValue(io.dialob.api.form.Form.Metadata value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceFormDatabase.FormMetadataRow- Returns:
- The value of the
idattribute
-
getValue
public io.dialob.api.form.Form.Metadata getValue()
- Specified by:
getValuein interfaceFormDatabase.FormMetadataRow- Returns:
- The value of the
valueattribute
-
withId
public final ImmutableFormMetadataRow 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
-
withValue
public final ImmutableFormMetadataRow withValue(io.dialob.api.form.Form.Metadata value)
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFormMetadataRowthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,value.
-
toString
public String toString()
Prints the immutable valueFormMetadataRowwith attribute values.
-
of
public static ImmutableFormMetadataRow of(String id, io.dialob.api.form.Form.Metadata value)
Construct a new immutableFormMetadataRowinstance.- Parameters:
id- The value for theidattributevalue- The value for thevalueattribute- Returns:
- An immutable FormMetadataRow instance
-
copyOf
public static ImmutableFormMetadataRow copyOf(FormDatabase.FormMetadataRow instance)
Creates an immutable copy of aFormDatabase.FormMetadataRowvalue. 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 FormMetadataRow instance
-
builder
public static ImmutableFormMetadataRow.Builder builder()
Creates a builder forImmutableFormMetadataRow.ImmutableFormMetadataRow.builder() .id(String) // requiredid.value(io.dialob.api.form.Form.Metadata) // requiredvalue.build();- Returns:
- A new ImmutableFormMetadataRow builder
-
-