Package io.dialob.api.proto
Class ImmutableValueSetEntry
- java.lang.Object
-
- io.dialob.api.proto.ImmutableValueSetEntry
-
- All Implemented Interfaces:
ValueSetEntry,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableValueSetEntry extends Object implements ValueSetEntry
Immutable implementation ofValueSetEntry.Use the builder to create immutable instances:
ImmutableValueSetEntry.builder(). Use the static factory method to create immutable instances:ImmutableValueSetEntry.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableValueSetEntry.BuilderBuilds instances of typeImmutableValueSetEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableValueSetEntry.Builderbuilder()Creates a builder forImmutableValueSetEntry.static ImmutableValueSetEntrycopyOf(ValueSetEntry instance)Creates an immutable copy of aValueSetEntryvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableValueSetEntrythat have equal attribute values.StringgetKey()StringgetValue()inthashCode()Computes a hash code from attributes:key,value.static ImmutableValueSetEntryof(String key, String value)Construct a new immutableValueSetEntryinstance.StringtoString()Prints the immutable valueValueSetEntrywith attribute values.ImmutableValueSetEntrywithKey(String value)Copy the current immutable object by setting a value for thekeyattribute.ImmutableValueSetEntrywithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getKey
public String getKey()
- Specified by:
getKeyin interfaceValueSetEntry- Returns:
- The value of the
keyattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceValueSetEntry- Returns:
- The value of the
valueattribute
-
withKey
public final ImmutableValueSetEntry withKey(String value)
Copy the current immutable object by setting a value for thekeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableValueSetEntry withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableValueSetEntrythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:key,value.
-
toString
public String toString()
Prints the immutable valueValueSetEntrywith attribute values.
-
of
public static ImmutableValueSetEntry of(String key, String value)
Construct a new immutableValueSetEntryinstance.- Parameters:
key- The value for thekeyattributevalue- The value for thevalueattribute- Returns:
- An immutable ValueSetEntry instance
-
copyOf
public static ImmutableValueSetEntry copyOf(ValueSetEntry instance)
Creates an immutable copy of aValueSetEntryvalue. 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 ValueSetEntry instance
-
builder
public static ImmutableValueSetEntry.Builder builder()
Creates a builder forImmutableValueSetEntry.ImmutableValueSetEntry.builder() .key(String) // requiredkey.value(String | null) // nullablevalue.build();- Returns:
- A new ImmutableValueSetEntry builder
-
-