Class ImmutableRecordValue

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

public final class ImmutableRecordValue extends Object implements RecordValue
Immutable implementation of RecordValue.

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

  • Method Details

    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableRecordValue 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 constant hash code value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableRecordValue.Builder builder()
      Creates a builder for ImmutableRecordValue.
       ImmutableRecordValue.builder()
          .build();
       
      Returns:
      A new ImmutableRecordValue builder