Class RevertSomeChanges<L extends Label>

java.lang.Object
org.variantsync.diffdetective.variation.diff.transform.RevertSomeChanges<L>
All Implemented Interfaces:
Transformer<VariationDiff<L>>

public class RevertSomeChanges<L extends Label> extends Object implements Transformer<VariationDiff<L>>
This transformer reverts some changes in a variation diff. The transformation requires a predicate on nodes to identify the changes which should be undone. An inserted node will be removed, so that the insertion does not happen. A removed node will be made unchanged so that it will not be deleted. When a node is made unchanged, also its parent node will be made unchanged if necessary to retain diff consistency.
Author:
Paul Bittner
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • transform

      public void transform(VariationDiff<L> d)
      Description copied from interface: Transformer
      Apply a transformation to the given Object inplace. The object will be changed.
      Specified by:
      transform in interface Transformer<L extends Label>
      Parameters:
      d - The T object to transform.