Record Class Lrc
java.lang.Object
java.lang.Record
lol.trq.orpheus.lyrics.Lrc
- Record Components:
title- thetitag, or emptyartist- theartag, or emptyalbum- thealtag, or emptylengthMillis- thelengthtag, or -1lyrics- the lines;Lyrics.NONEwhen the file holds none
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalbum()Returns the value of thealbumrecord component.artist()Returns the value of theartistrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelengthMillisrecord component.lyrics()Returns the value of thelyricsrecord component.static Lrcstatic Lrcread(byte[] data) Decodes and parses file content.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAX_BYTES
public static final int MAX_BYTES- See Also:
-
MAX_LINES
public static final int MAX_LINES- See Also:
-
-
Constructor Details
-
Lrc
Creates an instance of aLrcrecord class.- Parameters:
title- the value for thetitlerecord componentartist- the value for theartistrecord componentalbum- the value for thealbumrecord componentlengthMillis- the value for thelengthMillisrecord componentlyrics- the value for thelyricsrecord component
-
-
Method Details
-
read
Decodes and parses file content. Honours a UTF-8 or UTF-16 byte order mark; otherwise assumes UTF-8. -
parse
-
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
-
artist
-
album
-
lengthMillis
public long lengthMillis()Returns the value of thelengthMillisrecord component.- Returns:
- the value of the
lengthMillisrecord component
-
lyrics
-