From: David ‘Bombe’ Roden Date: Sun, 10 Apr 2011 10:39:58 +0000 (+0200) Subject: Add method to set all albums of a Sone. X-Git-Tag: beta-freefall-0.6.2-1~64 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=53ad6c35b87df3cca32d28a4c1a024aab2da5129;hp=2c3e2e6f9f651cddf73912b0eaf21e13408642e3 Add method to set all albums of a Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 30e10ad..4bd60cc 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -605,6 +605,20 @@ public class Sone implements Fingerprintable, Comparable { } /** + * Sets the albums of this Sone. + * + * @param albums + * The albums of this Sone + */ + public synchronized void setAlbums(Collection albums) { + Validation.begin().isNotNull("Albums", albums).check(); + albums.clear(); + for (Album album : albums) { + addAlbum(album); + } + } + + /** * Removes an album from this Sone. * * @param album