Record Class Box
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.show.engine.geom.Box
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.double
double
getWidth()
final int
hashCode()
Returns a hash code value for this object.Returns the value of thelowerRight
record component.shrink
(double delta) toString()
Returns a string representation of this record class.Returns the value of theupperLeft
record component.
-
Field Details
-
upperLeft
The field for theupperLeft
record component. -
lowerRight
The field for thelowerRight
record component.
-
-
Constructor Details
-
Box
-
Box
Creates an instance of aBox
record class.- Parameters:
upperLeft
- the value for theupperLeft
record componentlowerRight
- the value for thelowerRight
record 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 theupperLeft
record component.- Returns:
- the value of the
upperLeft
record component
-
lowerRight
Returns the value of thelowerRight
record component.- Returns:
- the value of the
lowerRight
record component
-