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

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

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

This class represents an artist, with a name, and a list of albums.

Author:
fleax
See Also:
Serialized Form

Constructor Summary
Artist(java.lang.String name)
          Constructor.
 
Method Summary
 void addAlbum(Album album)
          Adds an album to this artist.
 int compareTo(Artist o)
          Comparator.
 boolean equals(java.lang.Object o)
           
 Album getAlbum(java.lang.String albumName)
          Return an Album for a given album name.
 java.util.Map<java.lang.String,Album> getAlbums()
          Return albums of this artist.
 java.util.List<AudioFile> getAudioFiles()
          Gets the audio files.
 java.util.List<AudioObject> getAudioObjects()
          Returns a list of songs of this artist (all songs of all albums).
 java.lang.String getName()
          Returns the name of this artist.
 int hashCode()
           
 void removeAlbum(Album alb)
          Removes an album from this artist.
 java.lang.String toString()
          String representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Artist

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

Parameters:
name - the name
Method Detail

addAlbum

public void addAlbum(Album album)
Adds an album to this artist.

Parameters:
album - the album

compareTo

public int compareTo(Artist o)
Comparator.

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

equals

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

getAlbum

public Album getAlbum(java.lang.String albumName)
Return an Album for a given album name.

Parameters:
albumName - the album name
Returns:
the album

getAlbums

public java.util.Map<java.lang.String,Album> getAlbums()
Return albums of this artist.

Returns:
the albums

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 artist (all songs of all albums).

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

getName

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

Returns:
the name

hashCode

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

removeAlbum

public void removeAlbum(Album alb)
Removes an album from this artist.

Parameters:
alb - the alb

toString

public java.lang.String toString()
String representation.

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


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