X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=55e5fff04769afe67b2662903a62bf082ae8a4ef;hb=c4b53fe936d68587bf4ab26f4c997cf7e2fc5859;hp=6df84dfc2a0eefdb66648995b7bc13b5c20f9c97;hpb=51341976b36a42fec8fb093ef4079e4b618844f9;p=Sone.git 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. *