Record Class NativeUiInput.Bounds
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.screen.ui.NativeUiInput.Bounds
- Enclosing class:
NativeUiInput
public static record NativeUiInput.Bounds(float x, float y, float width, float height)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBounds(float x, float y, float width, float height) Creates an instance of aBoundsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(float pointX, float pointY) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Constructor Details
-
Bounds
public Bounds(float x, float y, float width, float height) Creates an instance of aBoundsrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
contains
public boolean contains(float pointX, float pointY) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-