X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=7acdb7ff2d43a291f069dab0c98e62146a5be72a;hp=4d0905ff68f043a33937fad19d6cd70a6eff7b21;hb=64abaf4ca1924732a99eeb9f1f461acbeda82a43;hpb=9359e98d853739ec57c24ef0ff2d69c8ce29847d diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 4d0905f..7acdb7f 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -189,6 +189,13 @@ public interface Sone extends Identified, Fingerprintable, Comparable { } }; + Function> toAllPosts = new Function>() { + @Override + public Collection apply(@Nullable Sone sone) { + return (sone != null) ? sone.getPosts() : Collections.emptyList(); + } + }; + /** * Returns the identity of this Sone. *