Record Class DialogData
java.lang.Object
java.lang.Record
com.fancyinnovations.fancydialogs.api.data.DialogData
public record DialogData(@NotNull String id, @NotNull String title, boolean canCloseWithEscape, @NotNull List<DialogBodyData> body, @Nullable DialogInputs inputs, @NotNull List<DialogButton> buttons)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDialogData(@NotNull String id, @NotNull String title, boolean canCloseWithEscape, @NotNull List<DialogBodyData> body, @Nullable DialogInputs inputs, @NotNull List<DialogButton> buttons) Creates an instance of aDialogDatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List<DialogBodyData> body()Returns the value of thebodyrecord component.@NotNull List<DialogButton> buttons()Returns the value of thebuttonsrecord component.booleanReturns the value of thecanCloseWithEscaperecord component.final booleanIndicates whether some other object is "equal to" this one.getButtonById(@NotNull String buttonId) final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.@Nullable DialogInputsinputs()Returns the value of theinputsrecord component.@NotNull Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DialogData
public DialogData(@NotNull @NotNull String id, @NotNull @NotNull String title, boolean canCloseWithEscape, @NotNull @NotNull List<DialogBodyData> body, @Nullable @Nullable DialogInputs inputs, @NotNull @NotNull List<DialogButton> buttons) Creates an instance of aDialogDatarecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentcanCloseWithEscape- the value for thecanCloseWithEscaperecord componentbody- the value for thebodyrecord componentinputs- the value for theinputsrecord componentbuttons- the value for thebuttonsrecord component
-
-
Method Details
-
getButtonById
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
canCloseWithEscape
public boolean canCloseWithEscape()Returns the value of thecanCloseWithEscaperecord component.- Returns:
- the value of the
canCloseWithEscaperecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
inputs
Returns the value of theinputsrecord component.- Returns:
- the value of the
inputsrecord component
-
buttons
Returns the value of thebuttonsrecord component.- Returns:
- the value of the
buttonsrecord component
-