Record Class MusicService.SearchResult
java.lang.Object
java.lang.Record
dev.despical.musicbot.audio.MusicService.SearchResult
- Enclosing class:
MusicService
-
Constructor Summary
ConstructorsConstructorDescriptionSearchResult(String title, String url, String thumbnailUrl, long duration, boolean live, String playQuery) Creates an instance of aSearchResultrecord 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.Returns the value of theplayQueryrecord 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.
-
Constructor Details
-
SearchResult
public SearchResult(String title, String url, String thumbnailUrl, long duration, boolean live, String playQuery) Creates an instance of aSearchResultrecord class.- Parameters:
title- the value for thetitlerecord componenturl- the value for theurlrecord componentthumbnailUrl- the value for thethumbnailUrlrecord componentduration- the value for thedurationrecord componentlive- the value for theliverecord componentplayQuery- the value for theplayQueryrecord 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
-
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
-
playQuery
Returns the value of theplayQueryrecord component.- Returns:
- the value of the
playQueryrecord component
-