Record Class Box
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.show.engine.geom.Box
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubledoublegetWidth()final inthashCode()Returns a hash code value for this object.Returns the value of thelowerRightrecord component.shrink(double delta) toString()Returns a string representation of this record class.Returns the value of theupperLeftrecord component.
-
Field Details
-
upperLeft
The field for theupperLeftrecord component. -
lowerRight
The field for thelowerRightrecord component.
-
-
Constructor Details
-
Box
-
Box
Creates an instance of aBoxrecord class.- Parameters:
upperLeft- the value for theupperLeftrecord componentlowerRight- the value for thelowerRightrecord component
-
-
Method Details
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
shrink
-
shrink
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
upperLeft
Returns the value of theupperLeftrecord component.- Returns:
- the value of the
upperLeftrecord component
-
lowerRight
Returns the value of thelowerRightrecord component.- Returns:
- the value of the
lowerRightrecord component
-