Class ChangedCollectionField

java.lang.Object
org.litebridgedb.tracking.ChangedField
org.litebridgedb.tracking.ChangedCollectionField

public final class ChangedCollectionField extends ChangedField
List-specific type of ChangedField which holds a snapshot of the original underlying map.

This class is a final implementation that provides additional functionality for handling changes to Map-type fields.

It inherits the common properties and behavior from the ChangedField class and extends it by including a snapshot of the original map associated with the field.

It ensures that the map snapshot is immutable.

  • Constructor Details

    • ChangedCollectionField

      public ChangedCollectionField(String fieldName, @Nullable Object value, @Nullable List<Integer> listSnapshot, @Nullable List<Integer> prevListSnapshot)
      Construct a ChangedMapField instance representing a change in a map field, including a snapshot of its original state as an immutable map.
      Parameters:
      fieldName - the name of the field being tracked
      value - the new value of the field
      listSnapshot - the original state of the map field, stored as an immutable map
      prevListSnapshot - the previous state of the list
  • Method Details