Song

public final class Song implements Serializable

Second custom constructor for the Song class. Creates a Song with file and title.

Parameters

songId

ID of the song

file

File to create a song from

title

Name of the song

Constructors

Link copied to clipboard
public Song Song(UUID songId, File file)

First custom constructor for the Song class. Creates a Song with file only.

Link copied to clipboard
public Song Song(UUID songId, File file, String title)

Functions

Link copied to clipboard
public Boolean equals(Object other)
Link copied to clipboard
public final Bitmap extractAlbumArt()
Link copied to clipboard
public final String extractAlbumTitle()
Link copied to clipboard
public final String extractArtists()
Link copied to clipboard
public final Integer extractDuration()
Link copied to clipboard
public final Album getAlbum()
Link copied to clipboard
public final UUID getAlbumID()

Returns the song as a file

Link copied to clipboard
public final File getFile()

Sets the file of a song manually without constructor

Link copied to clipboard
public final String getPath()
Link copied to clipboard
public final UUID getSongId()
Link copied to clipboard
public final String getTitle()

Returns the title/name of the song

Link copied to clipboard
public Integer hashCode()
Link copied to clipboard
public final Unit setAlbum(Album album)
Link copied to clipboard
public final Unit setAlbumID(UUID albumID)

Returns the song as a file

Link copied to clipboard
public final Unit setFile(File file)

Sets the file of a song manually without constructor

Link copied to clipboard
public final Unit setSongId(UUID songId)

Properties

Link copied to clipboard
private Album album
Link copied to clipboard
private UUID albumID

Returns the song as a file

Link copied to clipboard
private File file

Sets the file of a song manually without constructor

Link copied to clipboard
private final String path
Link copied to clipboard
private UUID songId
Link copied to clipboard
private final String title

Returns the title/name of the song