|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object song.User
public class User
Constructor Summary | |
---|---|
User()
Creates a new default instance of User |
|
User(java.lang.String allInfo)
Creates a new instance of User given a comma delimited string containing the last and first name (such as might be obtained via reading in a file that has one line per User) Assumes info is organized as: last,first |
|
User(java.lang.String last,
java.lang.String first)
creates a new instance of User, given last and first name |
|
User(java.lang.String last,
java.lang.String first,
int idLen)
creates a new instance of User, given last and first name and length of the user ID. |
Method Summary | |
---|---|
boolean |
addSongRating(Song sg,
int rate)
add a song rating, given the song and rating. |
boolean |
addSongRating(SongRating sngrt)
add a song rating, given the actual SongRating object to add. |
double |
getAveRatings()
report ave (mean) total rating per song . |
java.lang.String |
getFirstName()
report user first name |
java.lang.String |
getLastName()
report user last name |
java.lang.String |
getLastNameFirst()
report name, last name first |
java.lang.String |
getLastSongRatingString()
report string representation for last song rating added. |
SongRating |
getMatchingSongRating(Song toFind)
return a SongRating object corresponding to the passed Song - if the Song isn't found the returned SongRating will be a newly created one with the default rating |
SongRating |
getNthSongRating(int n)
report work info for Nth song rating presuming that there are that many song ratings. |
double |
getNthSongRatingRating(int n)
report song rating for Nth song rating presuming that there are that many song ratings. |
Song |
getNthSongRatingSong(int n)
report song for Nth song rating presuming that there are that many song ratings. |
java.lang.String |
getNthSongRatingString(int n)
report string representation for Nth song rating presuming that there are that many song ratings. |
int |
getNumSongRatings()
report number of ratings of songs |
java.lang.String |
getUserID()
report user ID - to user of User class, this is a String |
java.lang.String |
getWholeName()
report whole name |
boolean |
isMatchingSongRatingFound(Song toFind)
return whether the passed Song is found in the users song rating info |
void |
setFirstName(java.lang.String first)
set first name to a sepcific value. |
void |
setLastName(java.lang.String last)
set last name to a specific value. |
void |
sortSongRatings()
sort song ratings based on song rating's comparaison (the rating itself) |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public User()
public User(java.lang.String last, java.lang.String first)
public User(java.lang.String last, java.lang.String first, int idLen)
public User(java.lang.String allInfo)
Method Detail |
---|
public java.lang.String getUserID()
public java.lang.String getLastName()
public java.lang.String getFirstName()
public java.lang.String getWholeName()
public java.lang.String getLastNameFirst()
public int getNumSongRatings()
public SongRating getNthSongRating(int n)
public java.lang.String getNthSongRatingString(int n)
public Song getNthSongRatingSong(int n)
public double getNthSongRatingRating(int n)
public double getAveRatings()
public java.lang.String getLastSongRatingString()
public SongRating getMatchingSongRating(Song toFind)
public boolean isMatchingSongRatingFound(Song toFind)
public void setLastName(java.lang.String last)
public void setFirstName(java.lang.String first)
public boolean addSongRating(SongRating sngrt)
public boolean addSongRating(Song sg, int rate)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
public void sortSongRatings()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |