Class RelabelRoot<L extends Label>

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

public class RelabelRoot<L extends Label> extends Object implements Transformer<VariationDiff<L>>
Transformer that relabels the root of a VariationDiff.
Author:
Paul Bittner
  • Field Details

    • newLabel

      private final L extends Label newLabel
  • Constructor Details

    • RelabelRoot

      public RelabelRoot(L newLabel)
      Creates a new transformation that will set the root's label of a VariationDiff to the given text.
      Parameters:
      newLabel - New label for the root node.
  • Method Details

    • transform

      public void transform(VariationDiff<L> variationDiff)
      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:
      variationDiff - The T object to transform.