Record Class LineGraphExportOptions<L extends Label>
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.variation.diff.serialize.LineGraphExportOptions<L>
- Record Components:
graphFormat
-GraphFormat
treeFormat
-VariationDiffLabelFormat
nodeFormat
-DiffNodeLabelFormat
edgeFormat
-EdgeLabelFormat
onError
- Callback that is invoked when an error occurs.
public record LineGraphExportOptions<L extends Label>(GraphFormat graphFormat, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L extends Label> nodeFormat, EdgeLabelFormat<? super L extends Label> edgeFormat, BiConsumer<PatchDiff,Exception> onError)
extends Record
Options necessary for exporting a line graph.
This records contains information for exporting a
VariationDiff
into a line graph, such as the graph format and tree and node layouts.- Author:
- Paul Bittner
-
Field Summary
Modifier and TypeFieldDescriptionprivate final EdgeLabelFormat<? super L>
The field for theedgeFormat
record component.private final GraphFormat
The field for thegraphFormat
record component.private final DiffNodeLabelFormat<? super L>
The field for thenodeFormat
record component.private final BiConsumer<PatchDiff,
Exception> The field for theonError
record component.private final VariationDiffLabelFormat
The field for thetreeFormat
record component. -
Constructor Summary
ConstructorDescriptionLineGraphExportOptions
(GraphFormat graphFormat, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat) Creates a export options with a neutral filter (that accepts all trees), no transformers, and that logs errors.LineGraphExportOptions
(GraphFormat graphFormat, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat, BiConsumer<PatchDiff, Exception> onError) Creates an instance of aLineGraphExportOptions
record class.LineGraphExportOptions
(LineGraphImportOptions<? super L> importOptions) Create export options from the given import options. -
Method Summary
Modifier and TypeMethodDescriptionEdgeLabelFormat<? super L>
Returns the value of theedgeFormat
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegraphFormat
record component.final int
hashCode()
Returns a hash code value for this object.static BiConsumer<PatchDiff,
Exception> LogError()
Default value foronError
that logs errors.DiffNodeLabelFormat<? super L>
Returns the value of thenodeFormat
record component.onError()
Returns the value of theonError
record component.static BiConsumer<PatchDiff,
Exception> Default value foronError
that renders errors withPatchDiffRenderer.ErrorRendering(org.variantsync.diffdetective.variation.diff.render.VariationDiffRenderer)
(withVariationDiffRenderer.WithinDiffDetective()
.static BiConsumer<PatchDiff,
Exception> Default value foronError
that exits the program immediately upon an error withSystem.exit(int)
.final String
toString()
Returns a string representation of this record class.Returns the value of thetreeFormat
record component.
-
Field Details
-
graphFormat
The field for thegraphFormat
record component. -
treeFormat
The field for thetreeFormat
record component. -
nodeFormat
The field for thenodeFormat
record component. -
edgeFormat
The field for theedgeFormat
record component. -
onError
The field for theonError
record component.
-
-
Constructor Details
-
LineGraphExportOptions
public LineGraphExportOptions(GraphFormat graphFormat, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat) Creates a export options with a neutral filter (that accepts all trees), no transformers, and that logs errors. -
LineGraphExportOptions
Create export options from the given import options. InvokesLineGraphExportOptions(GraphFormat, VariationDiffLabelFormat, DiffNodeLabelFormat, EdgeLabelFormat)
with all formats from the given import options.- Parameters:
importOptions
- The import options to convert to export options.
-
LineGraphExportOptions
public LineGraphExportOptions(GraphFormat graphFormat, VariationDiffLabelFormat treeFormat, DiffNodeLabelFormat<? super L> nodeFormat, EdgeLabelFormat<? super L> edgeFormat, BiConsumer<PatchDiff, Exception> onError) Creates an instance of aLineGraphExportOptions
record class.- Parameters:
graphFormat
- the value for thegraphFormat
record componenttreeFormat
- the value for thetreeFormat
record componentnodeFormat
- the value for thenodeFormat
record componentedgeFormat
- the value for theedgeFormat
record componentonError
- the value for theonError
record component
-
-
Method Details
-
LogError
Default value foronError
that logs errors. -
RenderError
Default value foronError
that renders errors withPatchDiffRenderer.ErrorRendering(org.variantsync.diffdetective.variation.diff.render.VariationDiffRenderer)
(withVariationDiffRenderer.WithinDiffDetective()
. -
SysExitOnError
Default value foronError
that exits the program immediately upon an error withSystem.exit(int)
. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
graphFormat
Returns the value of thegraphFormat
record component.- Returns:
- the value of the
graphFormat
record component
-
treeFormat
Returns the value of thetreeFormat
record component.- Returns:
- the value of the
treeFormat
record component
-
nodeFormat
Returns the value of thenodeFormat
record component.- Returns:
- the value of the
nodeFormat
record component
-
edgeFormat
Returns the value of theedgeFormat
record component.- Returns:
- the value of the
edgeFormat
record component
-
onError
Returns the value of theonError
record component.- Returns:
- the value of the
onError
record component
-