Record Class ChatComponentSnapshot.ClickAction
java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.framework.ChatComponentSnapshot.ClickAction
- Record Components:
text- Contiguous literal text; empty for a textless style node.action- Encoded click action name.value- Text payload when represented by command, value or URL; otherwise null.
- Enclosing class:
ChatComponentSnapshot
public static record ChatComponentSnapshot.ClickAction(String text, String action, @Nullable String value)
extends Record
Frozen literal text and its associated effective action.
-
Constructor Summary
ConstructorsConstructorDescriptionClickAction(String text, String action, @Nullable String value) Validates the immutable action identity and literal text. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
ClickAction
Validates the immutable action identity and literal text.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-