Record Class DialogMetadata

java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogMetadata

public record DialogMetadata(@NotNull Component title, @Nullable Component externalTitle, boolean canCloseWithEscape, boolean pause, @NotNull DialogAfterAction afterAction, @NotNull List<DialogBody> body, @NotNull List<DialogInput> inputs) extends Record
  • Field Details

  • Constructor Details

    • DialogMetadata

      public DialogMetadata(@NotNull @NotNull Component title, @Nullable @Nullable Component externalTitle, boolean canCloseWithEscape, boolean pause, @NotNull @NotNull DialogAfterAction afterAction, @NotNull @NotNull List<DialogBody> body, @NotNull @NotNull List<DialogInput> inputs)
      Creates an instance of a DialogMetadata record class.
      Parameters:
      title - the value for the title record component
      externalTitle - the value for the externalTitle record component
      canCloseWithEscape - the value for the canCloseWithEscape record component
      pause - the value for the pause record component
      afterAction - the value for the afterAction record component
      body - the value for the body record component
      inputs - the value for the inputs record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • title

      @NotNull public @NotNull Component title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • externalTitle

      @Nullable public @Nullable Component externalTitle()
      Returns the value of the externalTitle record component.
      Returns:
      the value of the externalTitle record component
    • canCloseWithEscape

      public boolean canCloseWithEscape()
      Returns the value of the canCloseWithEscape record component.
      Returns:
      the value of the canCloseWithEscape record component
    • pause

      public boolean pause()
      Returns the value of the pause record component.
      Returns:
      the value of the pause record component
    • afterAction

      @NotNull public @NotNull DialogAfterAction afterAction()
      Returns the value of the afterAction record component.
      Returns:
      the value of the afterAction record component
    • body

      @NotNull public @NotNull List<DialogBody> body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • inputs

      @NotNull public @NotNull List<DialogInput> inputs()
      Returns the value of the inputs record component.
      Returns:
      the value of the inputs record component