Record Class MusicService.QueueSnapshot
java.lang.Object
java.lang.Record
dev.despical.musicbot.audio.MusicService.QueueSnapshot
- Enclosing class:
MusicService
public static record MusicService.QueueSnapshot(MusicService.NowPlayingSnapshot nowPlaying, List<MusicService.QueuedTrack> queuedTracks, int currentPage, int totalPages, int totalQueuedTracks)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionQueueSnapshot(MusicService.NowPlayingSnapshot nowPlaying, List<MusicService.QueuedTrack> queuedTracks, int currentPage, int totalPages, int totalQueuedTracks) Creates an instance of aQueueSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentPagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenowPlayingrecord component.Returns the value of thequeuedTracksrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalPagesrecord component.intReturns the value of thetotalQueuedTracksrecord component.
-
Constructor Details
-
QueueSnapshot
public QueueSnapshot(MusicService.NowPlayingSnapshot nowPlaying, List<MusicService.QueuedTrack> queuedTracks, int currentPage, int totalPages, int totalQueuedTracks) Creates an instance of aQueueSnapshotrecord class.- Parameters:
nowPlaying- the value for thenowPlayingrecord componentqueuedTracks- the value for thequeuedTracksrecord componentcurrentPage- the value for thecurrentPagerecord componenttotalPages- the value for thetotalPagesrecord componenttotalQueuedTracks- the value for thetotalQueuedTracksrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
nowPlaying
Returns the value of thenowPlayingrecord component.- Returns:
- the value of the
nowPlayingrecord component
-
queuedTracks
Returns the value of thequeuedTracksrecord component.- Returns:
- the value of the
queuedTracksrecord component
-
currentPage
public int currentPage()Returns the value of thecurrentPagerecord component.- Returns:
- the value of the
currentPagerecord component
-
totalPages
public int totalPages()Returns the value of thetotalPagesrecord component.- Returns:
- the value of the
totalPagesrecord component
-
totalQueuedTracks
public int totalQueuedTracks()Returns the value of thetotalQueuedTracksrecord component.- Returns:
- the value of the
totalQueuedTracksrecord component
-