Record Class DecisionFigure
java.lang.Object
java.lang.Record
network.ike.docs.koncept.DecisionFigure
- Record Components:
width- the figure's width, in its unitsheight- the figure's heightrole- what the figure is:decision-treeordecision-tornadomarks- the marks, in drawing order: what comes later is drawn over what comes before
public record DecisionFigure(double width, double height, String role, List<DecisionFigure.Mark> marks)
extends Record
A decision-tree figure as marks on a page: rectangles, circles, polygons, polylines and text,
each at a place in the figure's own units, each with its paint and a role naming what it stands
for. A figure is the whole of what a writer needs:
DecisionFigureSvg and
DecisionFigureTypst translate the marks and decide nothing, so the two media draw the
same picture, and a test reads the roles back from the SVG.
This class, the text metrics, the writers and the tornado builder are kept word for word in
step with their twins in komet-claude-plugin (network.ike.komet.claude.decision.render),
where the live surface draws the same figures over the stored tree; only the package line and
the adapters differ.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA circle about its centre.static interfaceOne mark of the figure.static final recordA closed polygon through its points, asx0, y0, x1, y1, ….static final recordAn open polyline through its points, asx0, y0, x1, y1, …, round-capped and round-joined.static final recordAn axis-aligned rectangle from its top-left corner.static final recordHow a mark's outline is drawn;nullfor no outline.static final recordA run of text whose top-left corner is at(x, top): the writers set the baseline from the size, so a label sits where the builder put its box. -
Constructor Summary
ConstructorsConstructorDescriptionDecisionFigure(double width, double height, String role, List<DecisionFigure.Mark> marks) Creates an instance of aDecisionFigurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()Returns the value of theheightrecord component.marks()Returns the value of themarksrecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.doublewidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
-
height
-
role
-
marks
-