Class ImmutableEvaluatedInputValue

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

@ParametersAreNonnullByDefault @Immutable public final class ImmutableEvaluatedInputValue extends Object implements EvaluatedInputValue
Immutable implementation of EvaluatedInputValue.

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

  • Method Details

    • getInputId

      public String getInputId()
      Specified by:
      getInputId in interface EvaluatedInputValue
      Returns:
      the id of the evaluated input
    • getInputName

      public String getInputName()
      Specified by:
      getInputName in interface EvaluatedInputValue
      Returns:
      the name of the evaluated input
    • getInputValue

      public String getInputValue()
      Specified by:
      getInputValue in interface EvaluatedInputValue
      Returns:
      the value of the evaluated input expression as JSON string
    • withInputId

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

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

      public final ImmutableEvaluatedInputValue withInputValue(String value)
      Copy the current immutable object by setting a value for the inputValue attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for inputValue (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 ImmutableEvaluatedInputValue 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: inputId, inputName, inputValue.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableEvaluatedInputValue.Builder builder()
      Creates a builder for ImmutableEvaluatedInputValue.
       ImmutableEvaluatedInputValue.builder()
          .withInputId(String | null) // nullable inputId
          .withInputName(String | null) // nullable inputName
          .withInputValue(String | null) // nullable inputValue
          .build();
       
      Returns:
      A new ImmutableEvaluatedInputValue builder