Record Class MusicService.NowPlayingSnapshot
java.lang.Object
java.lang.Record
dev.despical.musicbot.audio.MusicService.NowPlayingSnapshot
- Enclosing class:
MusicService
-
Constructor Summary
ConstructorsConstructorDescriptionNowPlayingSnapshot(String title, String url, String thumbnailUrl, String requestedBy, long position, long duration, boolean live, boolean loopForever, int volume) Creates an instance of aNowPlayingSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanlive()Returns the value of theliverecord component.booleanReturns the value of theloopForeverrecord component.longposition()Returns the value of thepositionrecord component.Returns the value of therequestedByrecord component.Returns the value of thethumbnailUrlrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.intvolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
NowPlayingSnapshot
public NowPlayingSnapshot(String title, String url, String thumbnailUrl, String requestedBy, long position, long duration, boolean live, boolean loopForever, int volume) Creates an instance of aNowPlayingSnapshotrecord class.- Parameters:
title- the value for thetitlerecord componenturl- the value for theurlrecord componentthumbnailUrl- the value for thethumbnailUrlrecord componentrequestedBy- the value for therequestedByrecord componentposition- the value for thepositionrecord componentduration- the value for thedurationrecord componentlive- the value for theliverecord componentloopForever- the value for theloopForeverrecord componentvolume- the value for thevolumerecord 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. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
thumbnailUrl
Returns the value of thethumbnailUrlrecord component.- Returns:
- the value of the
thumbnailUrlrecord component
-
requestedBy
Returns the value of therequestedByrecord component.- Returns:
- the value of the
requestedByrecord component
-
position
public long position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
duration
public long duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
live
public boolean live()Returns the value of theliverecord component.- Returns:
- the value of the
liverecord component
-
loopForever
public boolean loopForever()Returns the value of theloopForeverrecord component.- Returns:
- the value of the
loopForeverrecord component
-
volume
public int volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-