Class RelabelNodes<L extends Label>
java.lang.Object
org.variantsync.diffdetective.variation.diff.transform.RelabelNodes<L>
- All Implemented Interfaces:
Transformer<VariationDiff<L>>
Transformer that changes the label of each node using a relable function.
- Author:
- Paul Bittner
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRelabelNodes(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 TypeMethodDescriptionvoidtransform(VariationDiff<L> variationDiff) Apply a transformation to the given Object inplace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.variantsync.diffdetective.variation.diff.transform.Transformer
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:TransformerApply a transformation to the given Object inplace. The object will be changed.- Specified by:
transformin interfaceTransformer<L extends Label>- Parameters:
variationDiff- The T object to transform.
-