From 53ad6c35b87df3cca32d28a4c1a024aab2da5129 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 10 Apr 2011 12:39:58 +0200 Subject: [PATCH] Add method to set all albums of a Sone. --- src/main/java/net/pterodactylus/sone/data/Sone.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.7.4