Class Track
java.lang.Object
lol.trq.orpheus.Track
A piece of media. Every field may be missing: text is empty, numbers are -1 or 0,
id and uri are
null. Text from outside is trimmed and length-capped on construction.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NONE
-
-
Constructor Details
-
Track
public Track(String id, String title, List<String> artists, String album, String albumArtist, long durationMillis, int trackNumber, String uri, MediaKind kind) - Parameters:
id- the source's own identifier, or null; never requiredtitle- the titleartists- the performing artists, possibly emptyalbum- the album titlealbumArtist- the album artistdurationMillis- the length, or -1 when unknowntrackNumber- the position on the album, or 0 when unknownuri- a location the source can play, or nullkind- what the source says this is
-
-
Method Details
-
of
-
withDuration
-
id
-
title
-
artists
-
artistLine
The artists joined with ", ". Computed once. -
album
-
albumArtist
-
durationMillis
public long durationMillis() -
trackNumber
public int trackNumber() -
uri
-
kind
-
isEmpty
public boolean isEmpty() -
sameSong
Whether two descriptions are the same song. Titles must match after clean-up, at least one artist must match when both sides name any, and the lengths must be within two seconds when both are known. Identifiers are not compared: different sources use different ones. -
equals
-
hashCode
-
toString
-