Class ImmutableValueSet.Entry
java.lang.Object
io.dialob.session.engine.program.model.ImmutableValueSet.Entry
- All Implemented Interfaces:
ProgramNode,ValueSet.Entry,Serializable
- Enclosing class:
ImmutableValueSet
@Generated(from="ValueSet.Entry",
generator="Immutables")
@Immutable
@CheckReturnValue
public static final class ImmutableValueSet.Entry
extends Object
implements ValueSet.Entry
Immutable implementation of
ValueSet.Entry.
Use the builder to create immutable instances:
ImmutableValueSet.Entry.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forEntry.static ImmutableValueSet.EntrycopyOf(ValueSet.Entry instance) Creates an immutable copy of aValueSet.Entryvalue.booleanThis instance is equal to all instances ofEntrythat have equal attribute values.getKey()getLabel()inthashCode()Computes a hash code from attributes:key,label.toString()Prints the immutable valueEntrywith attribute values.final ImmutableValueSet.EntryCopy the current immutable object by setting a value for thekeyattribute.final ImmutableValueSet.EntrywithLabel(Expression value) Copy the current immutable object by setting a value for thelabelattribute.
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceValueSet.Entry- Returns:
- The value of the
keyattribute
-
getLabel
- Specified by:
getLabelin interfaceValueSet.Entry- Returns:
- The value of the
labelattribute
-
withKey
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 or the
thisobject
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofEntrythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:key,label. -
toString
Prints the immutable valueEntrywith attribute values. -
copyOf
Creates an immutable copy of aValueSet.Entryvalue. 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 Entry instance
-
builder
Creates a builder forEntry.ImmutableValueSet.Entry.builder() .key(String) // requiredkey.label(io.dialob.session.engine.program.model.Expression) // requiredlabel.build();- Returns:
- A new Entry builder
-