Record Class Box.RectBox
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.internal.layout.Box.RectBox
- All Implemented Interfaces:
Box
- Enclosing interface:
Box
public static record Box.RectBox(double x, double y, double width, double height, ReportColor fill, LineStyle stroke)
extends Record
implements Box
矩形;
fill、stroke 皆可為 null-
Nested Class Summary
Nested classes/interfaces inherited from interface Box
Box.BorderBox, Box.FigureBox, Box.ImageBox, Box.RectBox, Box.RuleBox, Box.TextBox -
Constructor Summary
ConstructorsConstructorDescriptionRectBox(double x, double y, double width, double height, ReportColor fill, LineStyle stroke) Creates an instance of aRectBoxrecord 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.doubleheight()Returns the value of theheightrecord component.stroke()Returns the value of thestrokerecord component.final StringtoString()Returns a string representation of this record class.doublewidth()Returns the value of thewidthrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
RectBox
Creates an instance of aRectBoxrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentfill- the value for thefillrecord componentstroke- the value for thestrokerecord 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
-
width
public double width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord 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
-