Record Class GuiGradient.Position
java.lang.Object
java.lang.Record
com.render.api.gui.GuiGradient.Position
- Record Components:
value- numeric positionunit- position unit
- Enclosing class:
GuiGradient
public static record GuiGradient.Position(float value, GuiGradient.PositionUnit unit)
extends Record
Typed stop position. Number values use gradient progress, percentages use
value / 100, and pixels resolve against the painted gradient line.-
Constructor Summary
ConstructorsConstructorDescriptionPosition(float value, GuiGradient.PositionUnit unit) Creates an instance of aPositionrecord 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.static GuiGradient.Positionnumber(float value) static GuiGradient.Positionpercent(float value) static GuiGradient.Positionpixels(float value) final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.floatvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
Method Details
-
number
-
percent
-
pixels
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
value
-
unit
-