Record Class LineGraphExportOptions<L extends Label>
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.variation.diff.serialize.LineGraphExportOptions<L>
- Record Components:
graphFormat-GraphFormattreeFormat-VariationDiffLabelFormatnodeFormat-DiffNodeLabelFormatedgeFormat-EdgeLabelFormatonError- 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
FieldsModifier and TypeFieldDescriptionprivate final EdgeLabelFormat<? super L> The field for theedgeFormatrecord component.private final GraphFormatThe field for thegraphFormatrecord component.private final DiffNodeLabelFormat<? super L> The field for thenodeFormatrecord component.private final BiConsumer<PatchDiff, Exception> The field for theonErrorrecord component.private final VariationDiffLabelFormatThe field for thetreeFormatrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLineGraphExportOptions(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 aLineGraphExportOptionsrecord 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 theedgeFormatrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegraphFormatrecord component.final inthashCode()Returns a hash code value for this object.static BiConsumer<PatchDiff, Exception> LogError()Default value foronErrorthat logs errors.DiffNodeLabelFormat<? super L> Returns the value of thenodeFormatrecord component.onError()Returns the value of theonErrorrecord component.static BiConsumer<PatchDiff, Exception> Default value foronErrorthat renders errors withPatchDiffRenderer.ErrorRendering(org.variantsync.diffdetective.variation.diff.render.VariationDiffRenderer)(withVariationDiffRenderer.WithinDiffDetective().static BiConsumer<PatchDiff, Exception> Default value foronErrorthat exits the program immediately upon an error withSystem.exit(int).final StringtoString()Returns a string representation of this record class.Returns the value of thetreeFormatrecord component.
-
Field Details
-
graphFormat
The field for thegraphFormatrecord component. -
treeFormat
The field for thetreeFormatrecord component. -
nodeFormat
The field for thenodeFormatrecord component. -
edgeFormat
The field for theedgeFormatrecord component. -
onError
The field for theonErrorrecord 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 aLineGraphExportOptionsrecord class.- Parameters:
graphFormat- the value for thegraphFormatrecord componenttreeFormat- the value for thetreeFormatrecord componentnodeFormat- the value for thenodeFormatrecord componentedgeFormat- the value for theedgeFormatrecord componentonError- the value for theonErrorrecord component
-
-
Method Details
-
LogError
Default value foronErrorthat logs errors. -
RenderError
Default value foronErrorthat renders errors withPatchDiffRenderer.ErrorRendering(org.variantsync.diffdetective.variation.diff.render.VariationDiffRenderer)(withVariationDiffRenderer.WithinDiffDetective(). -
SysExitOnError
Default value foronErrorthat 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 thegraphFormatrecord component.- Returns:
- the value of the
graphFormatrecord component
-
treeFormat
Returns the value of thetreeFormatrecord component.- Returns:
- the value of the
treeFormatrecord component
-
nodeFormat
Returns the value of thenodeFormatrecord component.- Returns:
- the value of the
nodeFormatrecord component
-
edgeFormat
Returns the value of theedgeFormatrecord component.- Returns:
- the value of the
edgeFormatrecord component
-
onError
Returns the value of theonErrorrecord component.- Returns:
- the value of the
onErrorrecord component
-