Package dev.ioliver.dtos
Record Class CardDimensions
java.lang.Object
java.lang.Record
dev.ioliver.dtos.CardDimensions
public record CardDimensions(CardContour contour, double height, double width, int centerX, int centerY)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCardDimensions(CardContour contour, double height, double width, int centerX, int centerY) Creates an instance of aCardDimensionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcenterX()Returns the value of thecenterXrecord component.intcenterY()Returns the value of thecenterYrecord component.contour()Returns the value of thecontourrecord component.final 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.final StringtoString()Returns a string representation of this record class.doublewidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
CardDimensions
Creates an instance of aCardDimensionsrecord class.- Parameters:
contour- the value for thecontourrecord componentheight- the value for theheightrecord componentwidth- the value for thewidthrecord componentcenterX- the value for thecenterXrecord componentcenterY- the value for thecenterYrecord 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 '=='. -
contour
Returns the value of thecontourrecord component.- Returns:
- the value of the
contourrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
width
public double width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
centerX
public int centerX()Returns the value of thecenterXrecord component.- Returns:
- the value of the
centerXrecord component
-
centerY
public int centerY()Returns the value of thecenterYrecord component.- Returns:
- the value of the
centerYrecord component
-