/** The description of this album. */
private String description;
- /** The index of the album picture. */
- private int albumImage = -1;
+ /** The ID of the album picture. */
+ private String albumImage;
/**
* Creates a new album with a random ID.
* @return The image to show when this album is listed
*/
public Image getAlbumImage() {
- if (albumImage == -1) {
+ if (albumImage == null) {
return null;
}
return images.get(albumImage);
}
/**
+ * Sets the ID of the album image.
+ *
+ * @param id
+ * The ID of the album image
+ * @return This album
+ */
+ public Album setAlbumImage(String id) {
+ this.albumImage = id;
+ return this;
+ }
+
+ /**
* Returns whether this album contains any other albums or images.
*
* @return {@code true} if this album is empty, {@code false} otherwise