net.sourceforge.atunes.kernel.modules.repository.model
Class Album

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.repository.model.Album
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Album>, TreeObject

public class Album
extends java.lang.Object
implements java.io.Serializable, TreeObject, java.lang.Comparable<Album>

This class represents an album, with it's name, artist, and songs.

Author:
fleax
See Also:
Serialized Form

Constructor Summary
Album(java.lang.String name)
          Constructor.
 
Method Summary
 void addSong(AudioFile file)
          Adds a song to this album.
 int compareTo(Album o)
          Comparator.
 boolean equals(java.lang.Object o)
           
 Artist getArtist()
          Returns the name of the artist of this album.
 java.util.List<AudioFile> getAudioFiles()
          Gets the audio files.
 java.util.List<AudioObject> getAudioObjects()
          Returns a list of songs of this album.
 java.lang.String getName()
          Returns name of the album.
 javax.swing.ImageIcon getPicture(int width, int heigth)
          Returns a picture of this album, with a given size.
 boolean hasCoverDownloaded()
          Returns true if aTunes has saved cover image.
 int hashCode()
           
 void removeSong(AudioFile file)
          Removes a song from this album.
 void setArtist(Artist artist)
          Sets the name of the artist of this album.
 java.lang.String toString()
          String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Album

public Album(java.lang.String name)
Constructor.

Parameters:
name - the name
Method Detail

addSong

public void addSong(AudioFile file)
Adds a song to this album.

Parameters:
file - the file

compareTo

public int compareTo(Album o)
Comparator.

Specified by:
compareTo in interface java.lang.Comparable<Album>
Parameters:
o - the o
Returns:
the int

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getArtist

public Artist getArtist()
Returns the name of the artist of this album.

Returns:
the artist

getAudioFiles

public java.util.List<AudioFile> getAudioFiles()
Gets the audio files.

Returns:
the audio files

getAudioObjects

public java.util.List<AudioObject> getAudioObjects()
Returns a list of songs of this album.

Specified by:
getAudioObjects in interface TreeObject
Returns:
the audio objects

getName

public java.lang.String getName()
Returns name of the album.

Returns:
the name

getPicture

public javax.swing.ImageIcon getPicture(int width,
                                        int heigth)
Returns a picture of this album, with a given size.

Parameters:
width - the width
heigth - the heigth
Returns:
the picture

hasCoverDownloaded

public boolean hasCoverDownloaded()
Returns true if aTunes has saved cover image.

Returns:
true, if checks for cover downloaded

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

removeSong

public void removeSong(AudioFile file)
Removes a song from this album.

Parameters:
file - the file

setArtist

public void setArtist(Artist artist)
Sets the name of the artist of this album.

Parameters:
artist - the artist

toString

public java.lang.String toString()
String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the string


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.