|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object song.Song
public class Song
Field Summary | |
---|---|
static int |
CURRENT_YEAR
|
static int |
FIRST_YEAR
|
Constructor Summary | |
---|---|
Song()
Creates a new instance of Song |
|
Song(java.lang.String allInfo)
Creates a new instance of Song given a comma delimited string containing the title and artist, string representing the genre, the year recorded, and length in minutes and seconds (such as might be obtained via reading in a file that has one line per Song) Assumes info is organized as: name,artist,genre string,year recorded,mins,secs |
|
Song(java.lang.String titl,
java.lang.String art)
Creates a new instance of Song given only the titla and artist |
|
Song(java.lang.String titl,
java.lang.String art,
int min,
int sec)
Creates a new instance of Song given just the title and artist, and length in minutes and seconds |
|
Song(java.lang.String titl,
java.lang.String art,
int yr,
int min,
int sec)
Creates a new instance of Song given the title and artist, the year recorded, and length in minutes and seconds |
|
Song(java.lang.String titl,
java.lang.String art,
java.lang.String genr)
Creates a new instance of Song given just the title and artist, and string representing the genre |
|
Song(java.lang.String titl,
java.lang.String art,
java.lang.String genr,
int min,
int sec)
Creates a new instance of Song given the title and artist, string representing the genre, and length in minutes and seconds |
|
Song(java.lang.String titl,
java.lang.String art,
java.lang.String genr,
int yr,
int min,
int sec)
Creates a new instance of Song given the title and artist, string representing the genre, the year recorded, and length in minutes and seconds |
|
Song(java.lang.String titl,
java.lang.String art,
java.lang.String genr,
int yr,
int min,
int sec,
int idLen)
Creates a new instance of Song given the title and artist, string representing the genre, the year recorded, and length in minutes and seconds, and the length of the ID to generate |
|
Song(java.lang.String titl,
java.lang.String art,
java.lang.String genr,
int yr,
int min,
int sec,
java.lang.String idStr)
Creates a new instance of Song given the title and artist, string representing the genre, the year recorded, and length in minutes and seconds, and the string representing the ID to use |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
determine if a passed Song has the same contents as the calling object (all contents). |
java.lang.String |
getArtist()
report name of the artist - individual or group |
MusicalGenre |
getGenre()
report genre (type of music) of the song - uses enumerated type |
int |
getLenMins()
report minute portion of the length of the song. |
int |
getLenSecs()
reports seconds portion of the length of the song. |
java.lang.String |
getLenString()
produce a friendly string version of the song length |
double |
getLenTotalMins()
reports total length of the song in minutes. |
int |
getLenTotalSecs()
reports total length of the song in seconds. |
java.lang.String |
getName()
report name of the song |
java.lang.String |
getSongID()
report songID - to user of Song class, this is a String |
java.lang.String |
getTitle()
report title (name) of the song |
int |
getYearRecorded()
report year the song was recorded |
boolean |
setArtist(java.lang.String art)
change name of the artist - individual or group |
boolean |
setGenre(MusicalGenre gen)
change genre (type of music) of the song - uses enumerated type |
boolean |
setGenre(java.lang.String gen)
change genre (type of music) of the song - passed a string that hopefully matches an enumerated type. |
boolean |
setLenMins(int mins)
change minute portion of the length of the song. |
boolean |
setLenSecs(int secs)
changes seconds portion of the length of the song. |
boolean |
setName(java.lang.String nm)
change name of the song |
boolean |
setSongID(id.ID sid)
change songID |
boolean |
setSongID(int len)
change songID given a length - generate a new random ID |
boolean |
setSongID(java.lang.String idStr)
change songID given a string |
boolean |
setYearRecorded(int yr)
change year the song was recorded |
java.lang.String |
toShortString()
produce a shorter friendly string version of the object |
java.lang.String |
toString()
produce a friendly string version of the object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CURRENT_YEAR
public static final int FIRST_YEAR
Constructor Detail |
---|
public Song()
public Song(java.lang.String titl, java.lang.String art)
public Song(java.lang.String titl, java.lang.String art, java.lang.String genr)
public Song(java.lang.String titl, java.lang.String art, int min, int sec)
public Song(java.lang.String titl, java.lang.String art, java.lang.String genr, int min, int sec)
public Song(java.lang.String titl, java.lang.String art, int yr, int min, int sec)
public Song(java.lang.String titl, java.lang.String art, java.lang.String genr, int yr, int min, int sec)
public Song(java.lang.String allInfo)
public Song(java.lang.String titl, java.lang.String art, java.lang.String genr, int yr, int min, int sec, int idLen)
public Song(java.lang.String titl, java.lang.String art, java.lang.String genr, int yr, int min, int sec, java.lang.String idStr)
Method Detail |
---|
public java.lang.String getSongID()
public java.lang.String getName()
public java.lang.String getArtist()
public MusicalGenre getGenre()
public int getYearRecorded()
public int getLenMins()
public int getLenSecs()
public java.lang.String getTitle()
public int getLenTotalSecs()
public double getLenTotalMins()
public java.lang.String getLenString()
public boolean setSongID(id.ID sid)
public boolean setSongID(java.lang.String idStr)
public boolean setSongID(int len)
public boolean setName(java.lang.String nm)
public boolean setArtist(java.lang.String art)
public boolean setGenre(MusicalGenre gen)
public boolean setGenre(java.lang.String gen)
public boolean setYearRecorded(int yr)
public boolean setLenMins(int mins)
public boolean setLenSecs(int secs)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toShortString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |