Class IndexedTreeFormat
java.lang.Object
org.variantsync.diffdetective.variation.diff.serialize.treeformat.IndexedTreeFormat
- All Implemented Interfaces:
LinegraphFormat,VariationDiffLabelFormat
Exports tree by indexing them.
This format keeps an internal counter that is incremented on each call of
toLabel(Source).
Thus, every produced label will have the successive index of the previously produced label.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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.serialize.LinegraphFormat
getIdentifier, getShortNameMethods inherited from interface org.variantsync.diffdetective.variation.diff.serialize.treeformat.VariationDiffLabelFormat
fromLineGraphLine, toLineGraphLine
-
Field Details
-
nextId
private int nextId
-
-
Constructor Details
-
IndexedTreeFormat
public IndexedTreeFormat()Creates a new format starting with index 0.
-
-
Method Details
-
reset
public void reset()Resets the current index to 0. -
fromLabel
Description copied from interface:VariationDiffLabelFormatConverts a label of line graph into aSource.- Specified by:
fromLabelin interfaceVariationDiffLabelFormat- Parameters:
label- A string containing the label of theSource- Returns:
- The
Sourcedescribed by this label.
-
toLabel
Description copied from interface:VariationDiffLabelFormatConverts aSourcelabel of line graph.- Specified by:
toLabelin interfaceVariationDiffLabelFormat- Parameters:
variationDiffSource- TheSourceto be converted- Returns:
- The corresponding line graph line
-