Class ImmutableEvaluatedOutputValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableEvaluatedOutputValue
All Implemented Interfaces:
JsonSerializable, RecordValue, EvaluatedOutputValue

@ParametersAreNonnullByDefault @Immutable public final class ImmutableEvaluatedOutputValue extends Object implements EvaluatedOutputValue
Immutable implementation of EvaluatedOutputValue.

Use the builder to create immutable instances: ImmutableEvaluatedOutputValue.builder().

  • Method Details

    • getOutputId

      public String getOutputId()
      Specified by:
      getOutputId in interface EvaluatedOutputValue
      Returns:
      the id of the evaluated output
    • getOutputName

      public String getOutputName()
      Specified by:
      getOutputName in interface EvaluatedOutputValue
      Returns:
      the name of the evaluated output
    • getOutputValue

      public String getOutputValue()
      Specified by:
      getOutputValue in interface EvaluatedOutputValue
      Returns:
      the value of the evaluated output expression as JSON string
    • withOutputId

      public final ImmutableEvaluatedOutputValue withOutputId(String value)
      Copy the current immutable object by setting a value for the outputId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for outputId (can be null)
      Returns:
      A modified copy of the this object
    • withOutputName

      public final ImmutableEvaluatedOutputValue withOutputName(String value)
      Copy the current immutable object by setting a value for the outputName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for outputName (can be null)
      Returns:
      A modified copy of the this object
    • withOutputValue

      public final ImmutableEvaluatedOutputValue withOutputValue(String value)
      Copy the current immutable object by setting a value for the outputValue attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for outputValue (can be null)
      Returns:
      A modified copy of the this object
    • equals

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

      public int hashCode()
      Returns a lazily computed hash code from attributes: outputId, outputName, outputValue.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableEvaluatedOutputValue copyOf(EvaluatedOutputValue instance)
      Creates an immutable copy of a EvaluatedOutputValue 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 EvaluatedOutputValue instance
    • builder

      public static ImmutableEvaluatedOutputValue.Builder builder()
      Creates a builder for ImmutableEvaluatedOutputValue.
       ImmutableEvaluatedOutputValue.builder()
          .withOutputId(String | null) // nullable outputId
          .withOutputName(String | null) // nullable outputName
          .withOutputValue(String | null) // nullable outputValue
          .build();
       
      Returns:
      A new ImmutableEvaluatedOutputValue builder