Package guideme.document
Record Class LytRect
java.lang.Object
java.lang.Record
guideme.document.LytRect
-
Constructor Summary
ConstructorDescriptionLytRect
(int x, int y, int width, int height) Creates an instance of aLytRect
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
bottom()
centerHorizontallyIn
(LytRect other) centerVerticallyIn
(LytRect other) boolean
contains
(int x, int y) boolean
static LytRect
empty()
final boolean
Indicates whether some other object is "equal to" this one.expand
(int amount) expand
(int left, int top, int right, int bottom) final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.boolean
intersects
(LytRect other) boolean
isEmpty()
move
(int x, int y) org.joml.Vector2i
point()
int
right()
shrink
(int left, int top, int right, int bottom) size()
final String
toString()
Returns a string representation of this record class.transform
(org.joml.Matrix4f pose) static LytRect
int
width()
Returns the value of thewidth
record component.withHeight
(int height) withWidth
(int width) withX
(int x) withY
(int y) int
x()
Returns the value of thex
record component.int
y()
Returns the value of they
record component.
-
Constructor Details
-
LytRect
public LytRect(int x, int y, int width, int height) Creates an instance of aLytRect
record class.- Parameters:
x
- the value for thex
record componenty
- the value for they
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record component
-
-
Method Details
-
empty
-
right
public int right() -
bottom
public int bottom() -
isEmpty
public boolean isEmpty() -
shrink
-
expand
-
expand
-
withWidth
-
withHeight
-
move
-
centerIn
-
centerHorizontallyIn
-
centerVerticallyIn
-
union
-
contains
-
contains
public boolean contains(int x, int y) -
intersects
-
withX
-
withY
-
transform
-
size
-
point
public org.joml.Vector2i point() -
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 '=='. -
x
public int x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public int y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-