Record Class DecisionFigure.Polygon
java.lang.Object
java.lang.Record
network.ike.docs.koncept.DecisionFigure.Polygon
- All Implemented Interfaces:
DecisionFigure.Mark
- Enclosing class:
DecisionFigure
public static record DecisionFigure.Polygon(double[] points, String fill, DecisionFigure.Stroke stroke, String role)
extends Record
implements DecisionFigure.Mark
A closed polygon through its points, as
x0, y0, x1, y1, ….-
Constructor Summary
ConstructorsConstructorDescriptionPolygon(double[] points, String fill, DecisionFigure.Stroke stroke, String role) Creates an instance of aPolygonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fill()Returns the value of thefillrecord component.final inthashCode()Returns a hash code value for this object.double[]points()Returns the value of thepointsrecord component.role()Returns the value of therolerecord component.stroke()Returns the value of thestrokerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Polygon
Creates an instance of aPolygonrecord class.- Parameters:
points- the value for thepointsrecord componentfill- the value for thefillrecord componentstroke- the value for thestrokerecord componentrole- the value for therolerecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
points
public double[] points()Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-
fill
Returns the value of thefillrecord component.- Returns:
- the value of the
fillrecord component
-
stroke
Returns the value of thestrokerecord component.- Returns:
- the value of the
strokerecord component
-
role
Returns the value of therolerecord component.- Specified by:
rolein interfaceDecisionFigure.Mark- Returns:
- the value of the
rolerecord component
-