Record Class Bounds
java.lang.Object
java.lang.Record
net.amygdalum.allotropy.fluent.elements.Bounds
-
Constructor Summary
ConstructorsConstructorDescriptionBounds(int left, int top, int right, int bottom) Creates an instance of aBoundsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbottom()Returns the value of thebottomrecord component.doublebound(CardinalDirection direction) doublebooleanfinal booleanIndicates whether some other object is "equal to" this one.static Boundsfinal inthashCode()Returns a hash code value for this object.intheight()intleft()Returns the value of theleftrecord component.intright()Returns the value of therightrecord component.intinttop()Returns the value of thetoprecord component.topLeft()topRight()toString()Returns a string representation of this record class.intwidth()
-
Constructor Details
-
Bounds
public Bounds(int left, int top, int right, int bottom) Creates an instance of aBoundsrecord class.- Parameters:
left- the value for theleftrecord componenttop- the value for thetoprecord componentright- the value for therightrecord componentbottom- the value for thebottomrecord component
-
-
Method Details
-
from
-
bound
-
center
-
bottomLeft
-
bottomRight
-
topLeft
-
topRight
-
width
public int width() -
height
public int height() -
size
-
contains
-
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 '=='. -
left
public int left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
top
public int top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-
right
public int right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
bottom
public int bottom()Returns the value of thebottomrecord component.- Returns:
- the value of the
bottomrecord component
-