X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=55e5fff04769afe67b2662903a62bf082ae8a4ef;hp=6df84dfc2a0eefdb66648995b7bc13b5c20f9c97;hb=39ad8597b568c51f095c07a8de4f5424db185d8e;hpb=527ba49512006908c5bae602e34a1ce7167ea3fe diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 6df84df..55e5fff 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -191,6 +191,15 @@ public interface Sone extends Identified, Fingerprintable, Comparable { } }; + public static final Function> toAllImages = new Function>() { + @Override + public List apply(@Nullable Sone sone) { + return (sone == null) ? Collections.emptyList() : + from(FLATTENER.apply(sone.getRootAlbum())) + .transformAndConcat(IMAGES).toList(); + } + }; + /** * Returns the identity of this Sone. *