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:
  • Method Details

    • getKey

      public String getKey()
      Specified by:
      getKey in interface ValueSet.Entry
      Returns:
      The value of the key attribute
    • getLabel

      public Expression getLabel()
      Specified by:
      getLabel in interface ValueSet.Entry
      Returns:
      The value of the label attribute
    • withKey

      public final ImmutableValueSet.Entry withKey(String value)
      Copy the current immutable object by setting a value for the key attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for key
      Returns:
      A modified copy or the this object
    • withLabel

      public final ImmutableValueSet.Entry withLabel(Expression value)
      Copy the current immutable object by setting a value for the label attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for label
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Entry that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: key, label.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Entry with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableValueSet.Entry copyOf(ValueSet.Entry instance)
      Creates an immutable copy of a ValueSet.Entry value. 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

      public static ImmutableValueSet.Entry.Builder builder()
      Creates a builder for Entry.
       ImmutableValueSet.Entry.builder()
          .key(String) // required key
          .label(io.dialob.session.engine.program.model.Expression) // required label
          .build();
       
      Returns:
      A new Entry builder