From: David ‘Bombe’ Roden Date: Tue, 27 Sep 2011 19:13:32 +0000 (+0200) Subject: Add method that returns all images of a Sone. X-Git-Tag: 0.7.2^2~16 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=e2e8fe4fd31ebfc73fa9ea2bd77aba71ee2939c7 Add method that returns all images 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 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