java.lang.Object
java.lang.Record
org.jhotdraw8.geom.AABB
- Record Components:
minX- the minimal x valueminY- the minimal y valuemaxX- the maximal x valuemaxY- the maximal y value
Axis aligned bounding box (AABB).
-
Constructor Summary
ConstructorsConstructorDescriptionAABB(double minX, double minY, double maxX, double maxY) Creates an instance of aAABBrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()doublemaxX()Returns the value of themaxXrecord component.doublemaxY()Returns the value of themaxYrecord component.doubleminX()Returns the value of theminXrecord component.doubleminY()Returns the value of theminYrecord component.final StringtoString()Returns a string representation of this record class.doublewidth()
-
Constructor Details
-
AABB
public AABB(double minX, double minY, double maxX, double maxY) Creates an instance of aAABBrecord class.
-
-
Method Details
-
width
public double width() -
height
public double height() -
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 with '=='. -
minX
public double minX()Returns the value of theminXrecord component.- Returns:
- the value of the
minXrecord component
-
minY
public double minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
maxX
public double maxX()Returns the value of themaxXrecord component.- Returns:
- the value of the
maxXrecord component
-
maxY
public double maxY()Returns the value of themaxYrecord component.- Returns:
- the value of the
maxYrecord component
-