Record Class LyricLine

java.lang.Object
java.lang.Record
lol.trq.orpheus.lyrics.LyricLine
Record Components:
startMillis - when the line starts, or -1 in unsynced lyrics
endMillis - when the next line starts, or -1 when unknown
text - the line; empty for an instrumental gap
words - timed pieces of the line, empty unless the lyrics are word-synced
translation - a translation of the line, or empty
romanization - a romanized form of the line, or empty

public record LyricLine(long startMillis, long endMillis, String text, List<LyricWord> words, String translation, String romanization) extends Record
One line of lyrics.
  • Constructor Details

    • LyricLine

      public LyricLine(long startMillis, long endMillis, String text, List<LyricWord> words, String translation, String romanization)
      Creates an instance of a LyricLine record class.
      Parameters:
      startMillis - the value for the startMillis record component
      endMillis - the value for the endMillis record component
      text - the value for the text record component
      words - the value for the words record component
      translation - the value for the translation record component
      romanization - the value for the romanization 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.
    • startMillis

      public long startMillis()
      Returns the value of the startMillis record component.
      Returns:
      the value of the startMillis record component
    • endMillis

      public long endMillis()
      Returns the value of the endMillis record component.
      Returns:
      the value of the endMillis record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • words

      public List<LyricWord> words()
      Returns the value of the words record component.
      Returns:
      the value of the words record component
    • translation

      public String translation()
      Returns the value of the translation record component.
      Returns:
      the value of the translation record component
    • romanization

      public String romanization()
      Returns the value of the romanization record component.
      Returns:
      the value of the romanization record component