clean up album and artist models
This commit is contained in:
parent
d5476cc9d0
commit
2900b8b9a9
8 changed files with 22 additions and 66 deletions
|
|
@ -54,30 +54,6 @@ public class Album implements Parcelable {
|
|||
this.songs = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getArtistId() {
|
||||
return artistId;
|
||||
}
|
||||
|
||||
public String getArtistName() {
|
||||
return artistName;
|
||||
}
|
||||
|
||||
public int getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public int getSongCount() {
|
||||
return songs.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
|
|
|||
|
|
@ -52,33 +52,13 @@ public class Artist implements Parcelable {
|
|||
this.songs = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getSongCount() {
|
||||
return songs.size();
|
||||
}
|
||||
|
||||
public int getAlbumCount() {
|
||||
return albums.size();
|
||||
}
|
||||
|
||||
public List<Song> getSongs() {
|
||||
return songs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Artist artist = (Artist) o;
|
||||
return id.equals(artist.getId());
|
||||
return id.equals(artist.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue