From e2e8fe4fd31ebfc73fa9ea2bd77aba71ee2939c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 27 Sep 2011 21:13:32 +0200 Subject: [PATCH] Add method that returns all images 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 aad50e5..be3a660 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -666,6 +666,20 @@ public class Sone implements Fingerprintable, Comparable { } /** + * Returns all images of a Sone. Images of a album are inserted into this + * list before images of all child albums. + * + * @return The list of all images + */ + public List getAllImages() { + List allImages = new ArrayList(); + for (Album album : getAllAlbums()) { + allImages.addAll(album.getImages()); + } + return allImages; + } + + /** * Adds an album to this Sone. * * @param album -- 2.7.4