Record Class WidthComponent
java.lang.Object
java.lang.Record
kr.toxicity.hud.api.component.WidthComponent
- Record Components:
component- componentwidth- width
public record WidthComponent(net.kyori.adventure.text.TextComponent.Builder component, int width)
extends Record
Component with width
-
Constructor Summary
ConstructorsConstructorDescriptionWidthComponent(net.kyori.adventure.text.TextComponent.Builder component, int width) Creates an instance of aWidthComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.text.TextComponent.BuilderReturns the value of thecomponentrecord component.@NotNull WidthComponentcopy()Copy componentfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull WidthComponentplus(@NotNull WidthComponent other) Adds componentfinal StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
WidthComponent
-
-
Method Details
-
plus
Adds component- Parameters:
other- other- Returns:
- Merged component
-
copy
-
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. -
component
-
width
-