- * Returns a flattened list of all albums of this Sone. The resulting list
- * contains parent albums before child albums so that the resulting list can
- * be parsed in a single pass.
- *
- * @return The flattened albums
- */
- public List<Album> getAllAlbums() {
- List<Album> flatAlbums = new ArrayList<Album>();
- flatAlbums.addAll(albums);
- int lastAlbumIndex = 0;
- while (lastAlbumIndex < flatAlbums.size()) {
- int previousAlbumCount = flatAlbums.size();
- for (Album album : new ArrayList<Album>(flatAlbums.subList(lastAlbumIndex, flatAlbums.size()))) {
- flatAlbums.addAll(album.getAlbums());
- }
- lastAlbumIndex = previousAlbumCount;
- }
- return flatAlbums;
- }
-
- /**
- * Returns all images of a Sone. Images of a album are inserted into this
- * list before images of all child albums.
+ * Returns all images of a Sone. Images of a album are inserted into this list
+ * before images of all child albums.