Record Class LinkGeometry
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LinkGeometry
- Record Components:
fromPoint- point in canvas coordinatestoPoint- point in canvas coordinatesfromSide- from side value used by the operationtoSide- to side value used by the operationlabelPoint- point in canvas coordinatesmiddlePoint- point in canvas coordinateslabelAngle- numeric label angle valuepoints- points in canvas coordinates
public record LinkGeometry(Point2D fromPoint, Point2D toPoint, AnchorSide fromSide, AnchorSide toSide, Point2D labelPoint, Point2D middlePoint, double labelAngle, List<Point2D> points)
extends Record
Resolved geometry for drawing a link path and its labels.
-
Constructor Summary
ConstructorsConstructorDescriptionLinkGeometry(Point2D fromPoint, Point2D toPoint, AnchorSide fromSide, AnchorSide toSide, Point2D labelPoint, Point2D middlePoint, double labelAngle, List<Point2D> points) Creates an instance of aLinkGeometryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromPointrecord component.fromSide()Returns the value of thefromSiderecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelabelAnglerecord component.Returns the value of thelabelPointrecord component.Returns the value of themiddlePointrecord component.points()Returns the value of thepointsrecord component.toPoint()Returns the value of thetoPointrecord component.toSide()Returns the value of thetoSiderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LinkGeometry
public LinkGeometry(Point2D fromPoint, Point2D toPoint, AnchorSide fromSide, AnchorSide toSide, Point2D labelPoint, Point2D middlePoint, double labelAngle, List<Point2D> points) Creates an instance of aLinkGeometryrecord class.- Parameters:
fromPoint- the value for thefromPointrecord componenttoPoint- the value for thetoPointrecord componentfromSide- the value for thefromSiderecord componenttoSide- the value for thetoSiderecord componentlabelPoint- the value for thelabelPointrecord componentmiddlePoint- the value for themiddlePointrecord componentlabelAngle- the value for thelabelAnglerecord componentpoints- the value for thepointsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fromPoint
Returns the value of thefromPointrecord component.- Returns:
- the value of the
fromPointrecord component
-
toPoint
Returns the value of thetoPointrecord component.- Returns:
- the value of the
toPointrecord component
-
fromSide
Returns the value of thefromSiderecord component.- Returns:
- the value of the
fromSiderecord component
-
toSide
Returns the value of thetoSiderecord component.- Returns:
- the value of the
toSiderecord component
-
labelPoint
Returns the value of thelabelPointrecord component.- Returns:
- the value of the
labelPointrecord component
-
middlePoint
Returns the value of themiddlePointrecord component.- Returns:
- the value of the
middlePointrecord component
-
labelAngle
public double labelAngle()Returns the value of thelabelAnglerecord component.- Returns:
- the value of the
labelAnglerecord component
-
points
Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-