Package kr.toxicity.hud.api.component
Record Class PixelComponent
java.lang.Object
java.lang.Record
kr.toxicity.hud.api.component.PixelComponent
- Record Components:
component- componentpixel- pixel
Component with width and pixel
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPixelComponent(@NotNull WidthComponent component, int pixel) Creates an instance of aPixelComponentrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull WidthComponentReturns the value of thecomponentrecord component.@NotNull PixelComponentcopy()Copy componentfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpixel()Returns the value of thepixelrecord component.@NotNull PixelComponentplus(@NotNull WidthComponent other) Pluses component with others.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
plus
Pluses component with others.- Parameters:
other- other- Returns:
- new component
-
copy
Copy component- Returns:
- copied component
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
pixel
public int pixel()Returns the value of thepixelrecord component.- Returns:
- the value of the
pixelrecord component
-