Record Class SpigotDialogPayload

java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.spigot.payload.SpigotDialogPayload
All Implemented Interfaces:
io.github.projectunified.unidialog.core.payload.DialogPayload

public record SpigotDialogPayload(UUID owner, @Nullable com.google.gson.JsonElement jsonData) extends Record implements io.github.projectunified.unidialog.core.payload.DialogPayload
  • Constructor Details

    • SpigotDialogPayload

      public SpigotDialogPayload(UUID owner, @Nullable @Nullable com.google.gson.JsonElement jsonData)
      Creates an instance of a SpigotDialogPayload record class.
      Parameters:
      owner - the value for the owner record component
      jsonData - the value for the jsonData record component
  • Method Details

    • textValue

      @Nullable public @Nullable String textValue(String key)
      Specified by:
      textValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • booleanValue

      @Nullable public @Nullable Boolean booleanValue(String key)
      Specified by:
      booleanValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • numberValue

      @Nullable public @Nullable Number numberValue(String key)
      Specified by:
      numberValue in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • map

      public Map<String,String> map()
      Specified by:
      map in interface io.github.projectunified.unidialog.core.payload.DialogPayload
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • owner

      public UUID owner()
      Returns the value of the owner record component.
      Specified by:
      owner in interface io.github.projectunified.unidialog.core.payload.DialogPayload
      Returns:
      the value of the owner record component
    • jsonData

      @Nullable public @Nullable com.google.gson.JsonElement jsonData()
      Returns the value of the jsonData record component.
      Returns:
      the value of the jsonData record component