Class RelabelNodes<L extends Label>
java.lang.Object
org.variantsync.diffdetective.variation.diff.transform.RelabelNodes<L>
- All Implemented Interfaces:
VariationDiffTransformer<L>
Transformer that changes the label of each node using a relable function.
- Author:
- Paul Bittner
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRelabelNodes
(Function<DiffNode<L>, L> newLabelOfNode) Creates a new transformation that relables each node with the given function.RelabelNodes
(L label) Creates a new transformation that sets the label of each node to the given string. -
Method Summary
Modifier and TypeMethodDescriptionvoid
transform
(VariationDiff<L> variationDiff) Apply a transformation to the given VariationDiff inplace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.variantsync.diffdetective.variation.diff.transform.VariationDiffTransformer
getDependencies
-
Field Details
-
getLabel
-
-
Constructor Details
-
RelabelNodes
Creates a new transformation that relables each node with the given function.- Parameters:
newLabelOfNode
- This function is invoked once for each DiffNode in the transformed VariationDiff. The returned String is set as the node's new label.
-
RelabelNodes
Creates a new transformation that sets the label of each node to the given string.- Parameters:
label
- The new label for each node in a VariationDiff.
-
-
Method Details
-
transform
Description copied from interface:VariationDiffTransformer
Apply a transformation to the given VariationDiff inplace. The given tree will be changed.- Specified by:
transform
in interfaceVariationDiffTransformer<L extends Label>
- Parameters:
variationDiff
- The VariationDiff to transform.
-