Record Class MultiLineTextWidget.CacheKey
java.lang.Object
java.lang.Record
net.minecraft.client.gui.components.MultiLineTextWidget.CacheKey
- Enclosing class:
- MultiLineTextWidget
static record MultiLineTextWidget.CacheKey(Component message, int maxWidth, OptionalInt maxRows)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OptionalIntThe field for themaxRowsrecord component.private final intThe field for themaxWidthrecord component.private final ComponentThe field for themessagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCacheKey(Component message, int maxWidth, OptionalInt maxRows) Creates an instance of aCacheKeyrecord 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.maxRows()Returns the value of themaxRowsrecord component.intmaxWidth()Returns the value of themaxWidthrecord component.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
message
The field for themessagerecord component. -
maxWidth
private final int maxWidthThe field for themaxWidthrecord component. -
maxRows
The field for themaxRowsrecord component.
-
-
Constructor Details
-
CacheKey
CacheKey(Component message, int maxWidth, OptionalInt maxRows) Creates an instance of aCacheKeyrecord class.- Parameters:
message- the value for themessagerecord componentmaxWidth- the value for themaxWidthrecord componentmaxRows- the value for themaxRowsrecord component
-
-
Method Details
-
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 '=='. -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
maxWidth
public int maxWidth()Returns the value of themaxWidthrecord component.- Returns:
- the value of the
maxWidthrecord component
-
maxRows
Returns the value of themaxRowsrecord component.- Returns:
- the value of the
maxRowsrecord component
-