Record Class PlaybackMetadata

java.lang.Object
java.lang.Record
dev.despical.musicbot.audio.PlaybackMetadata

public record PlaybackMetadata(String playQuery, String displayTitle, String sourceUrl, String requestedBy, String requestedByAvatarUrl, String thumbnailUrl, boolean loopForever) extends Record
  • Constructor Details

    • PlaybackMetadata

      public PlaybackMetadata(String playQuery, String displayTitle, String sourceUrl, String requestedBy, String requestedByAvatarUrl, String thumbnailUrl, boolean loopForever)
      Creates an instance of a PlaybackMetadata record class.
      Parameters:
      playQuery - the value for the playQuery record component
      displayTitle - the value for the displayTitle record component
      sourceUrl - the value for the sourceUrl record component
      requestedBy - the value for the requestedBy record component
      requestedByAvatarUrl - the value for the requestedByAvatarUrl record component
      thumbnailUrl - the value for the thumbnailUrl record component
      loopForever - the value for the loopForever 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 the compare method from their corresponding wrapper classes.
      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.
    • playQuery

      public String playQuery()
      Returns the value of the playQuery record component.
      Returns:
      the value of the playQuery record component
    • displayTitle

      public String displayTitle()
      Returns the value of the displayTitle record component.
      Returns:
      the value of the displayTitle record component
    • sourceUrl

      public String sourceUrl()
      Returns the value of the sourceUrl record component.
      Returns:
      the value of the sourceUrl record component
    • requestedBy

      public String requestedBy()
      Returns the value of the requestedBy record component.
      Returns:
      the value of the requestedBy record component
    • requestedByAvatarUrl

      public String requestedByAvatarUrl()
      Returns the value of the requestedByAvatarUrl record component.
      Returns:
      the value of the requestedByAvatarUrl record component
    • thumbnailUrl

      public String thumbnailUrl()
      Returns the value of the thumbnailUrl record component.
      Returns:
      the value of the thumbnailUrl record component
    • loopForever

      public boolean loopForever()
      Returns the value of the loopForever record component.
      Returns:
      the value of the loopForever record component