Record Class MergeFragment

java.lang.Object
java.lang.Record
com.evolveum.midpoint.schema.merger.threeway.MergeFragment
Record Components:
left -
right -
conflict -
All Implemented Interfaces:
DebugDumpable

public record MergeFragment(@NotNull List<ItemDelta<?,?>> left, @NotNull List<ItemDelta<?,?>> right, boolean conflict) extends Record implements DebugDumpable
When there are two deltas available: - if conflict is true, then one of two deltas have to be picked by user to be applied - if conflict is false, then only one delta should be applied (they should be equivalent)
  • Constructor Details

    • MergeFragment

      public MergeFragment(@NotNull @NotNull ItemDelta<?,?> left, @NotNull @NotNull ItemDelta<?,?> right, boolean conflict)
    • MergeFragment

      public MergeFragment(@NotNull @NotNull List<ItemDelta<?,?>> left, @NotNull @NotNull List<ItemDelta<?,?>> right, boolean conflict)
      Creates an instance of a MergeFragment record class.
      Parameters:
      left - the value for the left record component
      right - the value for the right record component
      conflict - the value for the conflict record component
  • Method Details

    • conflict

      public static MergeFragment conflict(@NotNull @NotNull ItemDelta<?,?> left, @NotNull @NotNull ItemDelta<?,?> right)
    • noConflict

      public static MergeFragment noConflict(@NotNull @NotNull ItemDelta<?,?> left, @NotNull @NotNull ItemDelta<?,?> right)
    • leftOnlyChange

      public static MergeFragment leftOnlyChange(@NotNull @NotNull ItemDelta<?,?> left)
    • rightOnlyChange

      public static MergeFragment rightOnlyChange(@NotNull @NotNull ItemDelta<?,?> right)
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • debugDump

      public String debugDump(int indent)
      Specified by:
      debugDump in interface DebugDumpable
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • left

      @NotNull public @NotNull List<ItemDelta<?,?>> left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • right

      @NotNull public @NotNull List<ItemDelta<?,?>> right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component
    • conflict

      public boolean conflict()
      Returns the value of the conflict record component.
      Returns:
      the value of the conflict record component