Record Class DecisionFigure.Rect
java.lang.Object
java.lang.Record
network.ike.docs.koncept.DecisionFigure.Rect
- All Implemented Interfaces:
DecisionFigure.Mark
- Enclosing class:
DecisionFigure
public static record DecisionFigure.Rect(double x, double y, double w, double h, String fill, double opacity, DecisionFigure.Stroke stroke, String role)
extends Record
implements DecisionFigure.Mark
An axis-aligned rectangle from its top-left corner.
-
Constructor Summary
ConstructorsConstructorDescriptionRect(double x, double y, double w, double h, String fill, double opacity, DecisionFigure.Stroke stroke, String role) Creates an instance of aRectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fill()Returns the value of thefillrecord component.doubleh()Returns the value of thehrecord component.final inthashCode()Returns a hash code value for this object.doubleopacity()Returns the value of theopacityrecord 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.doublew()Returns the value of thewrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
Rect
public Rect(double x, double y, double w, double h, String fill, double opacity, DecisionFigure.Stroke stroke, String role) Creates an instance of aRectrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentw- the value for thewrecord componenth- the value for thehrecord componentfill- the value for thefillrecord componentopacity- the value for theopacityrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
w
public double w()Returns the value of thewrecord component.- Returns:
- the value of the
wrecord component
-
h
public double h()Returns the value of thehrecord component.- Returns:
- the value of the
hrecord component
-
fill
Returns the value of thefillrecord component.- Returns:
- the value of the
fillrecord component
-
opacity
public double opacity()Returns the value of theopacityrecord component.- Returns:
- the value of the
opacityrecord 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
-